svn commit: r191902 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

[ Available lists | Index of svn-src-all | Month of May 2009 | Week of 7 May 2009 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Kip Macy <kmacy@FreeBSD.org>
Date
7 May 2009 20:57:06
Subject
svn commit: r191902 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID
200905072057.n47Kv6wW067998@svn.freebsd.org


[ Hide this part ]
Author: kmacy
Date: Thu May 7 20:57:06 2009
New Revision: 191902
URL: http://svn.freebsd.org/changeset/base/191902

Log:
Allow the VM to provide backpressure on the ARC cache as it does
on Solaris.

Modified:
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Thu May 7 20:39:23 2009 (r191901)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Thu May 7 20:57:06 2009 (r191902)
@@ -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);



Elapsed time: 0.105 seconds