[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 19:18:45
Message-ID: 200404162118.45805.mwelwarsky () web ! de
[Download RAW message or body]
On Friday 16 April 2004 20:57, Russell King - ARM Linux wrote:
> On Fri, Apr 16, 2004 at 08:48:01PM +0200, Matthias Welwarsky wrote:
> > 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.
>
> If you look at it from the short-term point of view then yes, this
> may help. However, if you really are down to that sort of low memory
> situation, you'll be thrashing pages and probably won't make much
> progress.
>
> If you did flush the PTE when you cleared the young bit, you'd increase
> the number of page faults dramatically in such a situation, maybe to
> the point where you'd get worse performance than freeing up the page
> and re-reading it from flash or disk.
>
> Remember - the young/old bit is a hint, nothing more.
Yes, but if the young bit is not refreshed, mapped pages that are not involved
in file IO are inevitably discarded. If they're read-only, they will never
again become "young" unless they're paged back in from disk.
Reading a page back in from flash is no big deal, reading from disk is dead
slow, and if the disk is powered down to extend battery life ... 2.5 seconds
spin-up time.
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