Peter Wemm wrote:
> John Baldwin wrote:
> > 
> > On 08-Jul-2002 Peter Wemm wrote:
> > > A few months ago, I had a bit of a disaster with some pmap optimizations.
> > > After committing, all hell broke loose.  It was backed out completely.
> > > 
> > > I finally found the problem (diff cleaned up to highlight the problem):
> > > 
> > > pmap_mapdev()
> > > ...
> > >         for (tmpva = va; size > 0; ) {
> > >                 pte = vtopte(tmpva);
> > >                 *pte = pa | PG_RW | PG_V | pgeflag;
> > >                 size -= PAGE_SIZE;
> > >                 tmpva += PAGE_SIZE;
> > > -               pa += PAGE_SIZE;
> > >         }
> > >         invltlb();
> > > 
> > > Excuse me while I go outside and shoot myself.
> > 
> > Hahahaha!
> > 
> > Glad to see you have fixed them. :)
> 
> Unfortunately, there are still more problems. :-(

> I've still got to find this one though:
> 
> TPTE at 0xbfca01f0  IS ZERO @ VA 2807c000
> panic: bad peter
> 
> db> trace
> panic(c043087f,bfca01f0,2807c000,1,c040e9d7) at panic+0x84
> pmap_remove_pages(c15d6ed0,0,bfc00000,115,c028aee0) at pmap_remove_pages+0x9c
> exit1(c15d5180,8b,c6,c24a0d04,0) at exit1+0x4f0
> sigexit(c15d5180,b,c040fbb1,6e9,0) at sigexit+0x1b9
> postsig(b,0,c0413100,e4,400) at postsig+0x11b
> ast(d3aa5d48) at ast+0x328
> doreti_ast() at doreti_ast+0x1a

ARGH!  I think I found this one too. :-/

I think the fix [relative to the patch] is:
pmap_pte_quick()
...
                /* are we current address space or kernel? */
                if (pmap == kernel_pmap || frame == (PTDpde & PG_FRAME))
                        return PTmap + index;
                newpf = pde & PG_FRAME;
                if (((*PMAP1) & PG_FRAME) != newpf) {
                        *PMAP1 = newpf | PG_RW | PG_V;
-                       pmap_invalidate_page(pmap, (vm_offset_t) PADDR1);
+                       pmap_invalidate_page(kernel_pmap, (vm_offset_t) PADDR1);
                }
                return PADDR1 + (index & (NPTEPG - 1));

*blush*.  (read pmap_invalidate_page() in the diff to see why)

Cheers,
-Peter
--
Peter Wemm - [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
"All of this is for nothing if we don't go to the stars" - JMS/B5


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to