[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-arm-kernel
Subject:    Re: On TLB flushing
From:       Matthias Welwarsky <mwelwarsky () web ! de>
Date:       2004-04-16 18:48:01
Message-ID: 200404162048.01427.mwelwarsky () web ! de
[Download RAW message or body]

On Friday 16 April 2004 17:18, Marc Singer wrote:
> On Fri, Apr 16, 2004 at 04:10:52PM +0100, Russell King - ARM Linux wrote:
> > Don't confuse the hardware PTE being cleared by act of clearing the
> > young bit vs the page being unmapped.  These are two completely
> > different operations.
>
> I don't think I am.  In the set_pte code, if the young bit is clear
> then the hardware PTE is cleared.  At any point after this, a read to
> that page should generate a fault, but that won't happen unless the
> TLB is cleared.

Uh, interesting. In the 2.4 kernel, is the hardware PTE also being cleared 
together with the YOUNG bit? Having a page fault on the next read (and the 
YOUNG bit being set again) would be a great help in low memory situations, to 
avoid executable pages from being discarded if they were in use recently.

> > With that change, any change to a PTE entry what so ever will result
> > in a TLB flush happening, which isn't what's intended in every case.
> > When a new PTE entry is created when none previously existed, we
> > miss out the TLB flush.  When we clear the "young" bit, we miss out
> > the TLB flush.  Adding in the TLB flush changes the system behaviour
> > because you've now forced a page fault to occur next time that page
> > is accessed.

Yes, but this would be very helpful for a more accurate emulation of the YOUNG 
bit functionality. Maybe it slows down the system, but if you have to read 
the page from a hard drive this is even slower.

regards,
	matthias

-------------------------------------------------------------------
Subscription options: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ:       http://www.arm.linux.org.uk/armlinux/mlfaq.php
Etiquette: http://www.arm.linux.org.uk/armlinux/mletiquette.php
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic