From owner-freebsd-stable@FreeBSD.ORG Wed Feb 28 13:54:14 2007 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0CCE616A400 for ; Wed, 28 Feb 2007 13:54:14 +0000 (UTC) (envelope-from jason.thomson@mintel.com) Received: from s200aog11.obsmtp.com (s200aog11.obsmtp.com [207.126.144.125]) by mx1.freebsd.org (Postfix) with SMTP id D148D13C4A3 for ; Wed, 28 Feb 2007 13:54:12 +0000 (UTC) (envelope-from jason.thomson@mintel.com) Received: from source ([217.206.187.80]) by eu1sys200aob011.postini.com ([207.126.147.11]) with SMTP; Wed, 28 Feb 2007 13:54:11 UTC Received: from [10.0.62.5] (unknown [10.0.62.5]) by rodney.mintel.co.uk (Postfix) with ESMTP id 14662181421; Wed, 28 Feb 2007 13:54:11 +0000 (GMT) Message-ID: <45E58982.9080800@mintel.com> Date: Wed, 28 Feb 2007 13:54:10 +0000 From: Jason Thomson User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040616 X-Accept-Language: en, en-us MIME-Version: 1.0 To: Konstantin Belousov , freebsd-stable@freebsd.org References: <45DDE5FD.4070404@mintel.com> <20070223041704.GJ39168@deviant.kiev.zoral.com.ua> In-Reply-To: <20070223041704.GJ39168@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: Help debugging non-sleepable lock panic on 6.2-RELEASE X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Feb 2007 13:54:14 -0000 Regarding: http://lists.freebsd.org/pipermail/freebsd-stable/2007-February/033241.html Konstantin Belousov wrote: > On Thu, Feb 22, 2007 at 06:50:37PM +0000, Jason Thomson wrote: > > > Try this (already committed to CURRENT as rev. 1.579). I would be very > interesting in getting feedback. Konstantin, thanks for your help. The patch below *appears* to have helped. The server survived for more than 24 hours under heavy (mysqld / apache) load. Previously, it would not typically survive this test for more than 5 hours. It's difficult to be 100% sure as the server load is not reliably reproducable. I will keep you informed of any developments. Thanks for your help. Kind regards, Jason. > > Index: sys/amd64/amd64/pmap.c > =================================================================== > RCS file: /usr/local/arch/ncvs/src/sys/amd64/amd64/pmap.c,v > retrieving revision 1.578 > retrieving revision 1.579 > diff -u -r1.578 -r1.579 > --- sys/amd64/amd64/pmap.c 18 Feb 2007 06:33:01 -0000 1.578 > +++ sys/amd64/amd64/pmap.c 19 Feb 2007 10:55:16 -0000 1.579 > @@ -77,7 +77,7 @@ > */ > > #include > -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.578 2007/02/18 06:33:01 alc Exp $"); > +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.579 2007/02/19 10:55:16 kib Exp $"); > > /* > * Manages physical address maps. > @@ -1542,9 +1542,15 @@ > while ((*pmap_pde(kernel_pmap, kernel_vm_end) & PG_V) != 0) { > kernel_vm_end = (kernel_vm_end + PAGE_SIZE * NPTEPG) & ~(PAGE_SIZE * NPTEPG - 1); > nkpt++; > + if (kernel_vm_end - 1 >= kernel_map->max_offset) { > + kernel_vm_end = kernel_map->max_offset; > + break; > + } > } > } > addr = roundup2(addr, PAGE_SIZE * NPTEPG); > + if (addr - 1 >= kernel_map->max_offset) > + addr = kernel_map->max_offset; > while (kernel_vm_end < addr) { > pde = pmap_pde(kernel_pmap, kernel_vm_end); > if (pde == NULL) { > @@ -1562,6 +1568,10 @@ > } > if ((*pde & PG_V) != 0) { > kernel_vm_end = (kernel_vm_end + PAGE_SIZE * NPTEPG) & ~(PAGE_SIZE * NPTEPG - 1); > + if (kernel_vm_end - 1 >= kernel_map->max_offset) { > + kernel_vm_end = kernel_map->max_offset; > + break; > + } > continue; > } > > @@ -1581,6 +1591,10 @@ > *pmap_pde(kernel_pmap, kernel_vm_end) = newpdir; > > kernel_vm_end = (kernel_vm_end + PAGE_SIZE * NPTEPG) & ~(PAGE_SIZE * NPTEPG - 1); > + if (kernel_vm_end - 1 >= kernel_map->max_offset) { > + kernel_vm_end = kernel_map->max_offset; > + break; > + } > } > } >