Date: Tue, 8 Mar 2011 08:29:04 -0500 From: John Baldwin <jhb@freebsd.org> To: freebsd-hackers@freebsd.org Cc: Patrick Mahan <PMahan@adaranet.com>, Jonathan Stuart <jstuart@adaranet.com> Subject: Re: UMA zone alloc on large UMA zone causing Page fault in kernel mode Message-ID: <201103080829.05135.jhb@freebsd.org> In-Reply-To: <32AB5C9615CC494997D9ABB1DB12783C024CDCB780@SJ-EXCH-1.adaranet.com> References: <32AB5C9615CC494997D9ABB1DB12783C024CDCB780@SJ-EXCH-1.adaranet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Monday, March 07, 2011 5:54:47 pm Jonathan Stuart wrote: > Hiya all, > > Does anyone have any idea why a large UMA zone created without the UMA_ZONE_PAGEABLE flag would page fault in kernel mode when I uma_zalloc one item with M_ZERO | M_WAITOK. The fault takes place during the bzero'ing of > the memory.. the pointer *looks* valid, as well. This does not happen with some smaller zones I've been using. > The zone shows up in ddb's "show uma", and it's size 620756992. > > Do I need to use UMA_ZONE_NOFREE to keep it in memory? This was not my understanding of that flag. No, that just prevents free slabs from being returned to the system. Is this on amd64? Some questions, things you can try if so: See if it is a direct-mapped address. If it is, then I'm at a loss as to why this would fault. Maybe verify that the physical addresses backed by that range are valid via SMAP? If it is not direct-mapped, grab my gdb scripts from http://www.freebsd.org/~jhb/gdb/. Then fire up kgdb on the crashdump, cd to a directory holding the scripts and do 'source gdb6'. Then you can use the 'kvm' command to display a rough layout of the kernel's address space. Make sure the virtual address range is backed by something valid. If it is then you might want to write some custom gdb scripts to find the right vm_map_entry in the kernel_map for your address range and find the backing VM object and starting offset. Then you can use gdb to examine the pages assigned to that VM object at that offset and ensure they are valid, etc. You might also try examining the PTE's directly as well. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201103080829.05135.jhb>