Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Sep 2010 07:14:07 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r212780 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201009170714.o8H7E7qL021546@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Fri Sep 17 07:14:07 2010
New Revision: 212780
URL: http://svn.freebsd.org/changeset/base/212780

Log:
  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

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	Fri Sep 17 04:55:01 2010	(r212779)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c	Fri Sep 17 07:14:07 2010	(r212780)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009170714.o8H7E7qL021546>