From owner-svn-src-head@FreeBSD.ORG Sat Jan 12 15:46:19 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 1FA04793; Sat, 12 Jan 2013 15:46:19 +0000 (UTC) (envelope-from c.jayachandran@gmail.com) Received: from mail-vb0-f44.google.com (mail-vb0-f44.google.com [209.85.212.44]) by mx1.freebsd.org (Postfix) with ESMTP id 75BFDDA6; Sat, 12 Jan 2013 15:46:18 +0000 (UTC) Received: by mail-vb0-f44.google.com with SMTP id fc26so2408782vbb.3 for ; Sat, 12 Jan 2013 07:46:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=Pj8ZY3ItucNaRAMJupGR5goRmdUhOduJNe59AkPRk8o=; b=fKjbGY/jrqq+wG20HeXsn2/tqbFi0/P9ly7PufQJXEpnJj7QenMaKi+i6FVM3fuBFJ F+qgvy7UYyqbsOYB2t+t/Hvjd0+3hGa+VEcUxoDCdqUNsed75eSnHnf3aZ3saeSKfnU7 WeeH+pEf76xTopQUMu69cjJTb9WLSMY8K2Klcwm91VAiWUm1Fw6i2Mg24+Uk3QUd3rY5 JO7iX2lp+bYM4s2ptOpNPjebyOL/vdgzl8Jvg5eKfxqcXYM9oSvy3+Gsab229kxMuOIX HueVgOK68L6I/GDd6JK5HYE3FS6SkUShbUrQ3nf+JYzt1vlx2Dhp/fUVDajvHG7itduC wdqA== MIME-Version: 1.0 Received: by 10.58.134.1 with SMTP id pg1mr12500837veb.55.1358005571269; Sat, 12 Jan 2013 07:46:11 -0800 (PST) Sender: c.jayachandran@gmail.com Received: by 10.58.161.135 with HTTP; Sat, 12 Jan 2013 07:46:11 -0800 (PST) In-Reply-To: <50F04FE5.7010406@rice.edu> References: <201211272119.qARLJxXV061083@svn.freebsd.org> <50C1BC90.90106@freebsd.org> <50C25A27.4060007@bluezbox.com> <50C26331.6030504@freebsd.org> <50C26AE9.4020600@bluezbox.com> <50C3A3D3.9000804@freebsd.org> <50C3AF72.4010902@rice.edu> <330405A1-312A-45A5-BB86-4969478D8BBD@bluezbox.com> <50D03E83.8060908@rice.edu> <50DD081E.8000409@bluezbox.com> <50EB1841.5030006@bluezbox.com> <50EB22D2.6090103@rice.edu> <50EB415F.8020405@freebsd.org> <50F04FE5.7010406@rice.edu> Date: Sat, 12 Jan 2013 21:16:11 +0530 X-Google-Sender-Auth: -90-T37_sXYJ9SPC83k1J1m5GwY Message-ID: Subject: Re: svn commit: r243631 - in head/sys: kern sys From: "Jayachandran C." To: Alan Cox Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Andre Oppermann , Oleksandr Tymoshenko X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 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: Sat, 12 Jan 2013 15:46:19 -0000 On Fri, Jan 11, 2013 at 11:16 PM, Alan Cox wrote: > On 01/11/2013 05:38, Jayachandran C. wrote: [...] >> I see an issue with commit on MIPS XLP platform as well. >> >> With 16 GB physical memory, the ncallout is calculated to be 538881 >> (since it is based on maxfiles - which is now based on the physical >> memory). Due to this, the callwheel allocation per cpu is 16MB >> (callwheelsize is 1MB). And on a 32 CPU machine, the total allocation >> for callouts comes to 32*16MB = 512MB. >> >> I have worked around this issue for now by increasing VM_KMEM_SIZE_MAX >> (which is 200MB now) - but I think a better fix is needed for this. >> > > MIPS should use a definition for VM_KMEM_SIZE_MAX that scales with the > kernel address space size, like amd64, i386, and sparc64, and not a > fixed number. I think that the following should work for both 32- and > 64-bit processors: > > Index: mips/include/vmparam.h > =================================================================== > --- mips/include/vmparam.h (revision 245229) > +++ mips/include/vmparam.h (working copy) > @@ -130,10 +130,11 @@ > #endif > > /* > - * Ceiling on amount of kmem_map kva space. > + * Ceiling on the amount of kmem_map KVA space: 40% of the entire KVA > space. > */ > #ifndef VM_KMEM_SIZE_MAX > -#define VM_KMEM_SIZE_MAX (200 * 1024 * 1024) > +#define VM_KMEM_SIZE_MAX ((VM_MAX_KERNEL_ADDRESS - \ > + VM_MIN_KERNEL_ADDRESS + 1) * 2 / 5) > #endif > > /* initial pagein size of beginning of executable file */ This fix is needed, can you please check it in? I have tested it for 32 and 64 bit. But the second part of the problem - allocating 512MB out of 16GB at boot-time for callouts - might need a fix as well. Thanks, JC.