diff options
author | kmacy <kmacy@FreeBSD.org> | 2009-05-07 20:57:06 +0000 |
---|---|---|
committer | kmacy <kmacy@FreeBSD.org> | 2009-05-07 20:57:06 +0000 |
commit | fea9d1bdc9af437988646e11fcc8ec875bb13d0c (patch) | |
tree | 67792bb6c60e7aa3d35f80a5a5d0d38f69ef873c /sys | |
parent | 54e76e600e5758a0c21cdeeca3790d960269bd4d (diff) | |
download | FreeBSD-src-fea9d1bdc9af437988646e11fcc8ec875bb13d0c.zip FreeBSD-src-fea9d1bdc9af437988646e11fcc8ec875bb13d0c.tar.gz |
Allow the VM to provide backpressure on the ARC cache as it does
on Solaris.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c | 9 |
1 files changed, 9 insertions, 0 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 7ca5280..de9a973 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c @@ -131,6 +131,8 @@ #include <sys/kstat.h> #include <sys/sdt.h> +#include <vm/vm_pageout.h> + static kmutex_t arc_reclaim_thr_lock; static kcondvar_t arc_reclaim_thr_cv; /* used to signal reclaim thr */ static uint8_t arc_thread_exit; @@ -1809,6 +1811,13 @@ arc_reclaim_needed(void) #ifdef _KERNEL + /* + * If pages are needed or we're within 2048 pages + * of needing to page need to reclaim + */ + if (vm_pages_needed || (vm_paging_target() > -2048)) + return (1); + if (needfree) return (1); |