From owner-svn-src-head@FreeBSD.ORG  Fri Jul 23 12:30:29 2010
Return-Path: <owner-svn-src-head@FreeBSD.ORG>
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 92CAD106567D;
	Fri, 23 Jul 2010 12:30:29 +0000 (UTC)
	(envelope-from ivoras@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 764BF8FC31;
	Fri, 23 Jul 2010 12:30:29 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6NCUTj8089989;
	Fri, 23 Jul 2010 12:30:29 GMT (envelope-from ivoras@svn.freebsd.org)
Received: (from ivoras@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6NCUTdm089988;
	Fri, 23 Jul 2010 12:30:29 GMT (envelope-from ivoras@svn.freebsd.org)
Message-Id: <201007231230.o6NCUTdm089988@svn.freebsd.org>
From: Ivan Voras <ivoras@FreeBSD.org>
Date: Fri, 23 Jul 2010 12:30:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r210410 - head/sys/kern
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	<svn-src-head.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-head>,
	<mailto:svn-src-head-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head>
List-Post: <mailto:svn-src-head@freebsd.org>
List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-head>,
	<mailto:svn-src-head-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Jul 2010 12:30:29 -0000

Author: ivoras
Date: Fri Jul 23 12:30:29 2010
New Revision: 210410
URL: http://svn.freebsd.org/changeset/base/210410

Log:
  Make lorunningspace catch up with hirunningspace.
  While there, add comment about the magic numbers.
  
  Prodded by:	alc

Modified:
  head/sys/kern/vfs_bio.c

Modified: head/sys/kern/vfs_bio.c
==============================================================================
--- head/sys/kern/vfs_bio.c	Fri Jul 23 11:00:46 2010	(r210409)
+++ head/sys/kern/vfs_bio.c	Fri Jul 23 12:30:29 2010	(r210410)
@@ -620,9 +620,14 @@ bufinit(void)
 	hibufspace = lmax(3 * maxbufspace / 4, maxbufspace - MAXBSIZE * 10);
 	lobufspace = hibufspace - MAXBSIZE;
 
-	lorunningspace = 512 * 1024;
+	/*
+	 * Note: The 16 MB upper limit for hirunningspace was chosen
+	 * arbitrarily and may need further tuning. The lower 1 MB
+	 * limit is the historical upper limit for hirunningspace.
+	 */
 	hirunningspace = lmax(lmin(roundup(hibufspace / 64, MAXBSIZE),
 	    16 * 1024 * 1024), 1024 * 1024);
+	lorunningspace = roundup(hirunningspace / 2, MAXBSIZE);
 
 /*
  * Limit the amount of malloc memory since it is wired permanently into