Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Feb 2007 13:54:10 +0000
From:      Jason Thomson <jason.thomson@mintel.com>
To:        Konstantin Belousov <kostikbel@gmail.com>,  freebsd-stable@freebsd.org
Subject:   Re: Help debugging non-sleepable lock panic on 6.2-RELEASE
Message-ID:  <45E58982.9080800@mintel.com>
In-Reply-To: <20070223041704.GJ39168@deviant.kiev.zoral.com.ua>
References:  <45DDE5FD.4070404@mintel.com> <20070223041704.GJ39168@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <sys/cdefs.h>
> -__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;                       
> +		}
>  	}
>  }
> 





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45E58982.9080800>