Date: Mon, 24 Sep 2007 18:42:10 +0400 From: Ruslan Ermilov <ru@FreeBSD.org> To: Larry Rosenman <ler@lerctr.org> Cc: Darren Reed <darrenr@FreeBSD.org>, Kris Kennaway <kris@FreeBSD.org>, freebsd-current@FreeBSD.org Subject: Re: panic: kmem_malloc(131072): kmem_map too small (AMD64) Message-ID: <20070924144210.GA82735@team.vega.ru> In-Reply-To: <20070924080347.O84223@thebighonker.lerctr.org> References: <20070921102946.T11189@borg> <46F415BF.9010500@FreeBSD.org> <20070921140550.D96923@thebighonker.lerctr.org> <46F41CFF.6080108@FreeBSD.org> <46F58799.1030702@freebsd.org> <46F58B21.8030307@FreeBSD.org> <20070924091558.GB32006@team.vega.ru> <46F78C59.1020801@FreeBSD.org> <20070924080347.O84223@thebighonker.lerctr.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Sep 24, 2007 at 08:04:33AM -0500, Larry Rosenman wrote: > On Mon, 24 Sep 2007, Kris Kennaway wrote: > >> Ruslan Ermilov wrote: >>> On Sat, Sep 22, 2007 at 11:37:37PM +0200, Kris Kennaway wrote: >>>> Darren Reed wrote: [...] >>>>> Stupid question, perhaps, but is vm.kmem_size/vm.kmem_size_max limited >>>>> by physical RAM? >>>> Yes. >>> To be precise, it's actually limited by 2 * sizeof(physical RAM). >>> It's still size of a _virtual_ memory map (kmem_map), after all: >>> : /* >>> : * Limit kmem virtual size to twice the physical memory. >>> : * This allows for kmem map sparseness, but limits the size >>> : * to something sane. Be careful to not overflow the 32bit >>> : * ints while doing the check. >>> : */ >>> : if (((vm_kmem_size / 2) / PAGE_SIZE) > cnt.v_page_count) >>> : vm_kmem_size = 2 * cnt.v_page_count * PAGE_SIZE; >> >> Well OK, but that seems pretty dangerous, because it leaves open a pathway >> to exhaust all of physical memory and presumably panic. > > is KVA pageable? Is the kmem_map dedicating non-pageable memory? > kmem_map is used to map memory for the zone allocator, including malloc(9). > I've set my vm.kmem_max to 1G, (on a 4G amd64 box). Is that reasonable? > It just means that your kernel can "malloc" up to 1G of memory. Cheers, -- Ruslan Ermilov ru@FreeBSD.org FreeBSD committer
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070924144210.GA82735>