From owner-svn-src-head@FreeBSD.ORG Thu Mar 12 19:54:50 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 DC7501065670; Thu, 12 Mar 2009 19:54:50 +0000 (UTC) (envelope-from alc@cs.rice.edu) Received: from mail.cs.rice.edu (mail.cs.rice.edu [128.42.1.31]) by mx1.freebsd.org (Postfix) with ESMTP id A7DB98FC19; Thu, 12 Mar 2009 19:54:50 +0000 (UTC) (envelope-from alc@cs.rice.edu) Received: from mail.cs.rice.edu (localhost.localdomain [127.0.0.1]) by mail.cs.rice.edu (Postfix) with ESMTP id 4E8862C2A8E; Thu, 12 Mar 2009 14:29:01 -0500 (CDT) X-Virus-Scanned: by amavis-2.4.0 at mail.cs.rice.edu Received: from mail.cs.rice.edu ([127.0.0.1]) by mail.cs.rice.edu (mail.cs.rice.edu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id JqjAvPqwkwc6; Thu, 12 Mar 2009 14:28:53 -0500 (CDT) Received: from adsl-216-63-78-18.dsl.hstntx.swbell.net (adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.cs.rice.edu (Postfix) with ESMTP id 17EA32C2ACE; Thu, 12 Mar 2009 14:28:53 -0500 (CDT) Message-ID: <49B96273.90008@cs.rice.edu> Date: Thu, 12 Mar 2009 14:28:51 -0500 From: Alan Cox User-Agent: Thunderbird 2.0.0.19 (X11/20090124) MIME-Version: 1.0 To: John Baldwin References: <200903091935.n29JZL3d035574@svn.freebsd.org> <200903091555.53181.jhb@freebsd.org> In-Reply-To: <200903091555.53181.jhb@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@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: Thu, 12 Mar 2009 19:54:51 -0000 John Baldwin wrote: > 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. > > We should try to segregate the kmem_alloc() allocations from the others. Mingling them with the others, makes it less likely that superpages are used. Alan