From owner-svn-src-head@FreeBSD.ORG Mon Mar 9 19:56:01 2009 Return-Path: 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 B1AE01065686; Mon, 9 Mar 2009 19:56:01 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 6FCC78FC24; Mon, 9 Mar 2009 19:56:01 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (pool-98-109-39-197.nwrknj.fios.verizon.net [98.109.39.197]) by cyrus.watson.org (Postfix) with ESMTPSA id 0351E46BA4; Mon, 9 Mar 2009 15:56:00 -0400 (EDT) Received: from localhost (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id n29JttVk019789; Mon, 9 Mar 2009 15:55:55 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: src-committers@freebsd.org Date: Mon, 9 Mar 2009 15:55:52 -0400 User-Agent: KMail/1.9.7 References: <200903091935.n29JZL3d035574@svn.freebsd.org> In-Reply-To: <200903091935.n29JZL3d035574@svn.freebsd.org> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200903091555.53181.jhb@freebsd.org> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Mon, 09 Mar 2009 15:55:55 -0400 (EDT) X-Virus-Scanned: ClamAV 0.94.2/9081/Mon Mar 9 13:51:30 2009 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r189595 - in head/sys: kern sys ufs/ffs vm 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Mar 2009 19:56:03 -0000 On Monday 09 March 2009 3:35:20 pm John Baldwin wrote: > Author: jhb > Date: Mon Mar 9 19:35:20 2009 > New Revision: 189595 > URL: http://svn.freebsd.org/changeset/base/189595 > > Log: > Adjust some variables (mostly related to the buffer cache) that hold > address space sizes to be longs instead of ints. Specifically, the follow > values are now longs: runningbufspace, bufspace, maxbufspace, > bufmallocspace, maxbufmallocspace, lobufspace, hibufspace, lorunningspace, > hirunningspace, maxswzone, maxbcache, and maxpipekva. Previously, a > relatively small number (~ 44000) of buffers set in kern.nbuf would result > in integer overflows resulting either in hangs or bogus values of > hidirtybuffers and lodirtybuffers. Now one has to overflow a long to see > such problems. There was a check for a nbuf setting that would cause > overflows in the auto-tuning of nbuf. I've changed it to always check and > cap nbuf but warn if a user-supplied tunable would cause overflow. > > Note that this changes the ABI of several sysctls that are used by things > like top(1), etc., so any MFC would probably require a some gross shims > to allow for that. > > MFC after: 1 month I was able to boot with kern.nbuf=132000 with a buffer cache a little over 2GB with this change on amd64 (thanks to Alan's changes to bump the kernel_map to 6GB). It gave this layout for kernel_map: (kgdb) kvm fffffffe40000000 - fffffffe40012000 kmem_alloc() / contigmalloc() fffffffe40012000 - fffffffe4003c000 AP stacks fffffffe4003c000 - fffffffe400f5000 kmem_alloc_nofault() (kstack/mapdev) fffffffe400f5000 - fffffffe40200000 kmem_alloc() / contigmalloc() fffffffe40200000 - fffffffee5565000 kmem_map fffffffee5565000 - fffffffee56e20a0 callouts fffffffee56e20a0 - fffffffee57078a0 swbuf fffffffee57078a0 - fffffffeea290000 buf fffffffeea290000 - ffffffff6d110000 buffer_map + pager_map ffffffff6d110000 - ffffffff6d540000 exec_map ffffffff6d540000 - ffffffff7596b000 pipe_map ffffffff7596b000 - ffffffff7777d000 kmem_alloc_nofault() (kstack/mapdev) ffffffff7777d000 - ffffffff7aab7000 kmem_alloc() / contigmalloc() ffffffff7aab7000 - ffffffff7aada000 kmem_alloc_nofault() (kstack/mapdev) ffffffff7aada000 - ffffffff7b6da000 kmem_alloc() / contigmalloc() ffffffff7b6da000 - ffffffff7b6fd000 kmem_alloc_nofault() (kstack/mapdev) ffffffff7b6fd000 - ffffffff7b883000 kmem_alloc() / contigmalloc() ffffffff7b883000 - ffffffff7b888000 kmem_alloc_nofault() (kstack/mapdev) ffffffff7b888000 - ffffffff7ba0e000 kmem_alloc() / contigmalloc() ffffffff7ba0e000 - ffffffff7ba13000 kmem_alloc_nofault() (kstack/mapdev) ffffffff7ba13000 - ffffffff7bb99000 kmem_alloc() / contigmalloc() ffffffff7bb99000 - ffffffff7bb9e000 kmem_alloc_nofault() (kstack/mapdev) ffffffff7bb9e000 - ffffffff7bd24000 kmem_alloc() / contigmalloc() ffffffff7bd24000 - ffffffff7bd29000 kmem_alloc_nofault() (kstack/mapdev) ffffffff7bd29000 - ffffffff7bf13000 kmem_alloc() / contigmalloc() ffffffff7bf13000 - ffffffff7bf22000 kmem_alloc_nofault() (kstack/mapdev) ffffffff7bf22000 - ffffffff7bf2c000 kmem_alloc() / contigmalloc() ffffffff7bf2c000 - ffffffff7bf9d000 kmem_alloc_nofault() (kstack/mapdev) ffffffff7bf9d000 - ffffffff7bfc5000 kmem_alloc() / contigmalloc() ffffffff7bfc5000 - ffffffff7c146000 kmem_alloc_nofault() (kstack/mapdev) ffffffff7c146000 - ffffffff80000000 ---- ffffffff80000000 - ffffffff80dd2c88 text/data/bss ffffffff80dd2c88 - ffffffff8639a000 bootstrap data ffffffff8639a000 - ffffffff86400000 ---- As far as an ABI fixup, I imagine that will involve having a hack where there is a new flag that sysctl_handle_long() checks and will truncate a value if the flag is set (CTLFLAG_INTABI or some such) and req->oldlen is sizeof(int) < sizeof(long) rather than failing. -- John Baldwin