From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 8 21:20:29 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C904B1065676 for ; Tue, 8 Mar 2011 21:20:29 +0000 (UTC) (envelope-from jstuart@adaranet.com) Received: from barracuda.adaranet.com (smtp.adaranet.com [72.5.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id A65308FC20 for ; Tue, 8 Mar 2011 21:20:29 +0000 (UTC) X-ASG-Debug-ID: 1299619228-2c5058720001-P5m3U7 Received: from SJ-EXCH-1.adaranet.com ([10.10.1.29]) by barracuda.adaranet.com with ESMTP id v10suob7SjvYIqpY; Tue, 08 Mar 2011 13:20:28 -0800 (PST) X-Barracuda-Envelope-From: jstuart@adaranet.com Received: from SJ-EXCH-1.adaranet.com ([fe80::7042:d8c2:5973:c523]) by SJ-EXCH-1.adaranet.com ([fe80::7042:d8c2:5973:c523%14]) with mapi; Tue, 8 Mar 2011 13:20:29 -0800 From: Jonathan Stuart X-Barracuda-BBL-IP: fe80::7042:d8c2:5973:c523 X-Barracuda-RBL-IP: fe80::7042:d8c2:5973:c523 To: John Baldwin , "freebsd-hackers@freebsd.org" Date: Tue, 8 Mar 2011 13:21:09 -0800 X-ASG-Orig-Subj: RE: UMA zone alloc on large UMA zone causing Page fault in kernel mode Thread-Topic: UMA zone alloc on large UMA zone causing Page fault in kernel mode Thread-Index: AcvdlM3ByxfVZlZiQGC2CD+YbHxOhAAQcAug Message-ID: <32AB5C9615CC494997D9ABB1DB12783C024CDCB861@SJ-EXCH-1.adaranet.com> References: <32AB5C9615CC494997D9ABB1DB12783C024CDCB780@SJ-EXCH-1.adaranet.com> <201103080829.05135.jhb@freebsd.org> In-Reply-To: <201103080829.05135.jhb@freebsd.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Barracuda-Connect: UNKNOWN[10.10.1.29] X-Barracuda-Start-Time: 1299619228 X-Barracuda-URL: http://172.16.10.203:8000/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at adaranet.com X-Mailman-Approved-At: Tue, 08 Mar 2011 23:06:50 +0000 Cc: Patrick Mahan Subject: RE: UMA zone alloc on large UMA zone causing Page fault in kernel mode X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Mar 2011 21:20:29 -0000 Thanks John. Yes, it is amd64. I decreased the size and we're working aro= und it that way for now.. I will do debugging in the future, because we hav= e some other zones that we need to be pretty large. Jonathan -----Original Message----- From: John Baldwin [mailto:jhb@freebsd.org] Sent: Tuesday, March 08, 2011 5:29 AM To: freebsd-hackers@freebsd.org Cc: Jonathan Stuart; Patrick Mahan Subject: Re: UMA zone alloc on large UMA zone causing Page fault in kernel = mode 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_ZO= NE_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 wi= th 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 u= nderstanding 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 w= hy 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 t= o 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. Mak= e 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