Subject: Re: pmap_unwire: wiring for pmap 0xfoo va 0xbar didn't change!
To: Chris Tribo <ctribo@dtcc.edu>
From: Chuck Silvers <chuq@chuq.com>
List: current-users
Date: 04/30/2005 10:11:32
--G4iJoqBmSsgzjUCe
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

hi,

this message means that somehow we're forgetting that a mapping is supposed
to be wired, since when we went to unwire it, it wasn't wired anymore.

could you try running with the attached patch?  it'll panic when it sees
us replacing a wired pmap mapping with a non-wired one, which is legal but
doesn't happen in practice, so if it happens then it's probably related to
what you're seeing.

also, could you find out what program is triggering those messages?
you could set a ddb breakpoint on printf and see what the current process
is at the time.

-Chuck


On Fri, Apr 29, 2005 at 02:30:44PM -0400, Chris Tribo wrote:
> While I was only seeing these infrequently, that is not the case  
> anymore.
> 
> ...
> Apr 29 14:25:32 atlantis last message repeated 46 times
> Apr 29 14:26:27 atlantis last message repeated 65 times
> Apr 29 14:26:28 atlantis /netbsd: pmap_unwire: wiring for pmap  
> 0xce3c9d48 va 0xbdbcd000 didn't change!
> Apr 29 14:26:29 atlantis last message repeated 2 times
> Apr 29 14:26:30 atlantis /netbsd: pmap_unwire: wiring for pmap  
> 0xd1d42130 va 0xbdbcd000 didn't change!
> Apr 29 14:26:31 atlantis last message repeated 3 times
> Apr 29 14:26:32 atlantis /netbsd: pmap_unwire: wiring for pmap  
> 0xd1d420cc va 0xbdbcd000 didn't change!
> Apr 29 14:26:55 atlantis last message repeated 30 times
> Apr 29 14:26:55 atlantis /netbsd: pmap_unwire: wiring for pmap  
> 0xd1d42068 va 0xbdbcd000 didn't change!
> Apr 29 14:27:25 atlantis last message repeated 39 times
> ...
> 
> It's up to about once a second during compilation of some packages.
> 
> NetBSD atlantis 3.99.3 NetBSD 3.99.3 (GENERIC.MPACPI.DEBUG) #11: Thu  
> Apr 28 19:17:26 EDT 2005 
>  

--G4iJoqBmSsgzjUCe
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="diff.x86pmap"

Index: src/sys/arch/i386/i386/pmap.c
===================================================================
RCS file: /cvsroot/src/sys/arch/i386/i386/pmap.c,v
retrieving revision 1.182
diff -u -p -r1.182 pmap.c
--- src/sys/arch/i386/i386/pmap.c	1 Apr 2005 11:59:31 -0000	1.182
+++ src/sys/arch/i386/i386/pmap.c	30 Apr 2005 17:09:26 -0000
@@ -3284,6 +3284,7 @@ pmap_enter(pmap, va, pa, prot, flags)
 	 */
 
 	if (pmap_valid_entry(opte) && ((opte & PG_FRAME) == pa)) {
+		KASSERT((opte & PG_W) == 0 || (npte & PG_W) != 0);
 
 		/*
 		 * first, calculate pm_stats updates.  resident count will not

--G4iJoqBmSsgzjUCe--