]> git.proxmox.com Git - mirror_zfs.git/commit
Adjust arc_p based on "bytes" in arc_shrink
authorPrakash Surya <surya1@llnl.gov>
Wed, 11 Dec 2013 20:25:30 +0000 (12:25 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 21 Feb 2014 22:53:08 +0000 (14:53 -0800)
commit39e055c44b3025d9ef87f6c6178ef5ae5e2a55c6
treea4b3581ed1870fdc33a6d38446420a9c9e5e3240
parent914158259225d9723bbb288457797936b41d3c9a
Adjust arc_p based on "bytes" in arc_shrink

In an attempt to prevent arc_c from collapsing "too fast", the
arc_shrink() function was updated to take a "bytes" parameter by this
change:

    commit 302f753f1657c05a4287226eeda1f53ae431b8a7
    Author: Brian Behlendorf <behlendorf1@llnl.gov>
    Date:   Tue Mar 13 14:29:16 2012 -0700

        Integrate ARC more tightly with Linux

Unfortunately, that change failed to make a similar change to the way
that arc_p was updated. So, there still exists the possibility for arc_p
to collapse to near 0 when the kernel start calling the arc's shrinkers.

This change attempts to fix this, by decrementing arc_p by the "bytes"
parameter in the same way that arc_c is updated.

In addition, a minimum value of arc_p is attempted to be maintained,
similar to the way a minimum arc_p value is maintained in arc_adapt().

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #2110
module/zfs/arc.c