diff options
author | kmacy <kmacy@FreeBSD.org> | 2009-10-06 21:40:50 +0000 |
---|---|---|
committer | kmacy <kmacy@FreeBSD.org> | 2009-10-06 21:40:50 +0000 |
commit | 3665e257c1063729cb55852b1e0686ab8301f7d1 (patch) | |
tree | ce45b351a58336f1960b1236eb520b37f0a9aa28 /sys/cddl | |
parent | ef46e20857c5bfda286877d2900d7e9f643fe98d (diff) | |
download | FreeBSD-src-3665e257c1063729cb55852b1e0686ab8301f7d1.zip FreeBSD-src-3665e257c1063729cb55852b1e0686ab8301f7d1.tar.gz |
Prevent paging pressure from draining arc too much
- always drain arc if above arc_c_max - never drain arc if arc is below arc_c_max
MFC after: 3 days
Diffstat (limited to 'sys/cddl')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c | 9 |
1 files changed, 6 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 64fded4..83a4c97 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c @@ -1821,6 +1821,12 @@ arc_reclaim_needed(void) #endif #ifdef _KERNEL + if (needfree) + return (1); + if (arc_size > arc_c_max) + return (1); + if (arc_size <= arc_c_min) + return (0); /* * If pages are needed or we're within 2048 pages @@ -1829,9 +1835,6 @@ arc_reclaim_needed(void) if (vm_pages_needed || (vm_paging_target() > -2048)) return (1); - if (needfree) - return (1); - #if 0 /* * take 'desfree' extra pages, so we reclaim sooner, rather than later |