diff options
author | avg <avg@FreeBSD.org> | 2010-09-17 07:14:07 +0000 |
---|---|---|
committer | avg <avg@FreeBSD.org> | 2010-09-17 07:14:07 +0000 |
commit | c94255f128c822492f902f30a35a1a2fa9df68d7 (patch) | |
tree | 36bae9b4a2e001ed9e540b89b65db4c8d24568ba /sys/cddl | |
parent | 6e0a0395a19126a38365cea1c00c71d850a7e4e3 (diff) | |
download | FreeBSD-src-c94255f128c822492f902f30a35a1a2fa9df68d7.zip FreeBSD-src-c94255f128c822492f902f30a35a1a2fa9df68d7.tar.gz |
zfs arc_reclaim_needed: more reasonable threshold for available pages
vm_paging_target() is not a trigger of any kind for pageademon, but
rather a "soft" target for it when it's already triggered.
Thus, trying to keep 2048 pages above that level at the expense of ARC
was simply driving ARC size into the ground even with normal memory
loads.
Instead, use a threshold at which a pagedaemon scan is triggered, so
that ARC reclaiming helps with pagedaemon's task, but the latter still
recycles active and inactive pages.
PR: kern/146410, kern/138790
MFC after: 3 weeks
Diffstat (limited to 'sys/cddl')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c index 32c079a..d2309b2 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c @@ -2161,10 +2161,10 @@ arc_reclaim_needed(void) return (0); /* - * If pages are needed or we're within 2048 pages - * of needing to page need to reclaim + * Cooperate with pagedaemon when it's time for it to scan + * and reclaim some pages. */ - if (vm_pages_needed || (vm_paging_target() > -2048)) + if (vm_paging_need()) return (1); #if 0 |