]> git.proxmox.com Git - mirror_zfs.git/commit - module/zfs/arc.c
Update arc_available_memory() to check freemem
authorBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 27 Jul 2015 20:17:32 +0000 (13:17 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 30 Jul 2015 18:50:22 +0000 (11:50 -0700)
commit11f552fa9074a94dac3463300e369013ec2f1544
tree58293fbe84d64056544233fa17888e982e75c8ba
parent6339c1b9dce9f7cf4b7269d588d7a9c3bf338ebb
Update arc_available_memory() to check freemem

While Linux doesn't provide detailed information about the state of
the VM it does provide us total free pages.  This information should
be incorporated in to the arc_available_memory() calculation rather
than solely relying on a signal from direct reclaim.  Conceptually
this brings arc_available_memory() back in sync with illumos.

It is also desirable that the target amount of free memory be tunable
on a system.  While the default values are expected to work well
for most workloads there may be cases where custom values are needed.
The zfs_arc_sys_free module option was added for this purpose.

zfs_arc_sys_free - The target number of bytes the ARC should leave
                   as free memory on the system.  This value can
                   checked in /proc/spl/kstat/zfs/arcstats and
                   setting this module option will override the
                   default value.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #3637
man/man5/zfs-module-parameters.5
module/zfs/arc.c