Date: Sat, 12 Jan 2013 12:34:05 -0600 From: Alan Cox <alc@rice.edu> To: "Jayachandran C." <jchandra@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Andre Oppermann <andre@freebsd.org>, Oleksandr Tymoshenko <gonzo@bluezbox.com> Subject: Re: svn commit: r243631 - in head/sys: kern sys Message-ID: <50F1AC9D.1060101@rice.edu> In-Reply-To: <CA%2B7sy7D=ZjTLirGW3BVGcAu0h8-dWpib%2BYziUjEqegOL9J4adw@mail.gmail.com> References: <201211272119.qARLJxXV061083@svn.freebsd.org> <ABB3E29B-91F3-4C25-8FAB-869BBD7459E1@bluezbox.com> <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> <CA%2B7sy7CkdoyScOEDEXWuwJxjCS5zTcC8_fu9isCeTFxT8opNJQ@mail.gmail.com> <50F04FE5.7010406@rice.edu> <CA%2B7sy7D=ZjTLirGW3BVGcAu0h8-dWpib%2BYziUjEqegOL9J4adw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 01/12/2013 09:46, Jayachandran C. wrote: > On Fri, Jan 11, 2013 at 11:16 PM, Alan Cox <alc@rice.edu> 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. Done. Also, I suspect that 32-bit MIPS kernels should use these definitions (copied from i386/include/vmparam.h): #ifndef VM_MAX_AUTOTUNE_MAXUSERS #define VM_MAX_AUTOTUNE_MAXUSERS 384 #endif #ifndef VM_MAX_AUTOTUNE_NMBCLUSTERS /* old maxusers max value. */ #define VM_MAX_AUTOTUNE_NMBCLUSTERS (1024 + VM_MAX_AUTOTUNE_MAXUSERS * 64) #endif Could you look into this? > 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. >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50F1AC9D.1060101>