Date: Thu, 31 Jan 2013 02:10:13 -0600 From: Alan Cox <alan.l.cox@gmail.com> To: Andriy Gapon <avg@freebsd.org> Cc: freebsd-arch@freebsd.org Subject: Re: kva size on amd64 Message-ID: <CAJUyCcOvHXauk76LnahQPGmdcHbkDOiR1_=4w%2BDW=sZ6i6EJ%2BA@mail.gmail.com> In-Reply-To: <51098743.2050603@FreeBSD.org> References: <507E7E59.8060201@FreeBSD.org> <51098743.2050603@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jan 30, 2013 at 2:49 PM, Andriy Gapon <avg@freebsd.org> wrote: > on 17/10/2012 12:46 Andriy Gapon said the following: > > > > What are the main benefits, if any, of limiting KVA space size - or in > fact > > tying it to physical memory size - on amd64? > > This question is perhaps relevant to other platforms with "unlimited > kva" too. > > I actually already have patch that auto-sets kmem_size to kmem_size_max on > amd64. > > My primary motivation is that I from time to time still see reports about > too > small kmem_map on non-tuned amd64 systems. This is really ridiculous > regardless of whether there is ZFS in use or not. > > Another motivation is that I really see no reason at all to artificially > limit > KVA. This creates no benefits, increases fragility and reduces > flexibility. > > > In short, it will waste a non-trivial amount of physical memory. Unlike user virtual address spaces, page table pages are preallocated for the kernel virtual address space. More precisely, they are preallocated for the reserved (or defined) regions of the kernel map, i.e., every range of addresses that has a corresponding vm_map_entry. The kmem map is one such reserved region. So, if you always set your kmem map to its maximum possible size of ~300GB, then you are preallocating about 600MB of physical memory for page table pages that will never be used (except on machines with 300+ GB of DRAM).
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJUyCcOvHXauk76LnahQPGmdcHbkDOiR1_=4w%2BDW=sZ6i6EJ%2BA>