forked from openzfs/spl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include other sources of freeable memory in the freemem calculation
This prevents ARC collapse when non-ZFS filesystems, the block layer or other consumers use a lot of reclaimable memory.
- Loading branch information
Showing
1 changed file
with
4 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 comment
on commit 08807f8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed. As has been discussed in the issue tracker, this is clearly a heuristic but that said, the idea of "free memory" is a bit wiggly to begin with. This seems to be the best solution for the time being so I'll add a pull request for it.
This effectively changes the meaning of
freemem
but I admit it probably the cleanest way to solve this issue. We're going to need to remember to revisit this once the ARC is backed by the page cache and therefore is accounted for in NR_INACTIVE_FILE. But until that that time this seems little a pretty clean fix. Let me verify it doesn't cause build failures for older kernels and then I'll get it in. I'm glad this was caught.