Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Nov 2001 14:10:01 -0800 (PST)
From:      Ian Dowse <iedowse@maths.tcd.ie>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: i386/22441: pmap_growkernel() is not effective at kernel vm limit of 0xffc00000
Message-ID:  <200111172210.fAHMA1026284@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

The following reply was made to PR i386/22441; it has been noted by GNATS.

From: Ian Dowse <iedowse@maths.tcd.ie>
To: freebsd-gnats-submit@freebsd.org
Cc: David Greenman <dg@root.com>, dillon@freebsd.org,
	peter@freebsd.org
Subject: Re: i386/22441: pmap_growkernel() is not effective at kernel vm limit of 0xffc00000
Date: Sat, 17 Nov 2001 22:07:42 +0000

 I think the change proposed by this PR corresponds to the following
 patch; pmap_growkernel's `addr' argument is one past the last valid
 offset, so we don't want to change it if it is already at the start
 of a 4M region. The roundup2() macro does the right thing in this
 case, whereas the existing code may increase kernel_vm_end 4M too
 far, so it can potentially wrap around to 0.
 
 (See the PR for further details, though dispite what it says, I think
 only the following rounding should be changed).
 
 Ian
 
 Index: pmap.c
 ===================================================================
 RCS file: /dump/FreeBSD-CVS/src/sys/i386/i386/pmap.c,v
 retrieving revision 1.297
 diff -u -r1.297 pmap.c
 --- pmap.c	17 Nov 2001 01:56:04 -0000	1.297
 +++ pmap.c	17 Nov 2001 21:38:25 -0000
 @@ -1587,7 +1587,7 @@
  			nkpt++;
  		}
  	}
 -	addr = (addr + PAGE_SIZE * NPTEPG) & ~(PAGE_SIZE * NPTEPG - 1);
 +	addr = roundup2(addr, PAGE_SIZE * NPTEPG);
  	while (kernel_vm_end < addr) {
  		if (pdir_pde(PTD, kernel_vm_end)) {
  			kernel_vm_end = (kernel_vm_end + PAGE_SIZE * NPTEPG) & ~(PAGE_SIZE * NPTEPG - 1);

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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