Date: Mon, 21 May 2012 01:29:14 +0200 From: Marko Zec <zec@fer.hr> To: Alan Cox <alc@rice.edu> Cc: alc@freebsd.org, freebsd-hackers@freebsd.org, freebsd-amd64@freebsd.org Subject: Re: superpages and kmem on amd64 Message-ID: <201205210129.14718.zec@fer.hr> In-Reply-To: <4FB97A41.70405@rice.edu> References: <201205200901.32613.zec@fer.hr> <201205210048.16877.zec@fer.hr> <4FB97A41.70405@rice.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 21 May 2012 01:12:01 Alan Cox wrote: ... > >>> BTW, apparently malloc(size, M_TEMP, M_NOWAIT) requests fail for size> > >>> 1G, even at boot time. Any ideas how to circumvent that (8.3-STABLE, > >>> amd64, 4G physical RAM)? > >> > >> I suspect that you need to increase the size of your kmem map. > > > > Huh any hints how should I achieve that? In desperation I placed > > > > vm.kmem_size=8G > > > > in /boot/loader.conf and got this: > > > > vm.kmem_map_free: 8123924480 > > vm.kmem_map_size: 8364032 > > vm.kmem_size_scale: 1 > > vm.kmem_size_max: 329853485875 > > vm.kmem_size_min: 0 > > vm.kmem_size: 8132288512 > > > > but malloc(2G) still fails... > > Here is at least one reason why it fails: > > void * > uma_large_malloc(int size, int wait) > > Note the type of "size". Can you malloc 1GB? Uff, good catch... malloc(1G) works, malloc(1.99G) works, malloc(2G) doesn't! Anyhow, malloc(1G) is big enough for what I want to do ATM, I was just curious why it breaks with bigger requests. Thanks, Marko
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205210129.14718.zec>