Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Jul 2010 17:44:01 +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: r210427 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201007231744.o6NHi1Ng069894@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Fri Jul 23 17:44:01 2010
New Revision: 210427
URL: http://svn.freebsd.org/changeset/base/210427

Log:
  zfs arc_memory_throttle: available memory is free + cache
  
  OpenSolaris freemem has the same meaning as our v_free_count +
  v_cache_count.
  
  Obtained from:	Artem Belevich <fbsdlist@src.cx>,
  		Peter Jeremy <peterjeremy@acm.org>
  Discussed with:	pjd
  MFC after:	2 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 Jul 23 17:42:42 2010	(r210426)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c	Fri Jul 23 17:44:01 2010	(r210427)
@@ -3653,7 +3653,8 @@ static int
 arc_memory_throttle(uint64_t reserve, uint64_t inflight_data, uint64_t txg)
 {
 #ifdef _KERNEL
-	uint64_t available_memory = ptoa((uintmax_t)cnt.v_free_count);
+	uint64_t available_memory = ptoa((uintmax_t)cnt.v_free_count
+	    + cnt.v_cache_count);
 	static uint64_t page_load = 0;
 	static uint64_t last_txg = 0;
 



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