svn commit: r192516 - user/kmacy/releng_7_2_fcs/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

Kip Macy kmacy at FreeBSD.org
Thu May 21 03:35:03 UTC 2009


Author: kmacy
Date: Thu May 21 03:35:02 2009
New Revision: 192516
URL: http://svn.freebsd.org/changeset/base/192516

Log:
  change prioritization of arc_reclaim handling a bit so that we don't get
  compressed down to nothing by the inactive queue

Modified:
  user/kmacy/releng_7_2_fcs/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c

Modified: user/kmacy/releng_7_2_fcs/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
==============================================================================
--- user/kmacy/releng_7_2_fcs/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c	Thu May 21 02:47:46 2009	(r192515)
+++ user/kmacy/releng_7_2_fcs/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c	Thu May 21 03:35:02 2009	(r192516)
@@ -1820,15 +1820,16 @@ arc_reclaim_needed(void)
 #endif
 
 #ifdef _KERNEL
+	if (needfree)
+		return (1);
 
+	if (arc_size <= arc_c_min)
+		return (0);
 	/*
-	 * If pages are needed or we're within 2048 pages 
-	 * of needing to page need to reclaim
+	 * If pages are needed and we're using more than half
+	 * of kmem ... be charitable
 	 */
-	if (vm_pages_needed || (vm_paging_target() > -2048))
-		return (1);
-
-	if (needfree)
+	if (vm_pages_needed && (arc_size > kmem_size()/2))
 		return (1);
 
 #if 0


More information about the svn-src-user mailing list