[lkml]   [2003]   [Dec]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Page aging broken in 2.6
Benjamin Herrenschmidt <> wrote:
> HI !
> I don't know if x86 is affected (I suspect not) but ppc and ppc64
> definitely are.
> in mm/rmap.c, in page_referenced(), we do that twice:
> if (ptep_test_and_clear_young(pte))
> referenced++;
> And we never flush the TLB entry.
> I don't know if x86 (or other archs really using page tables) will
> actually set the referenced bit again in the PTE if it's already set
> in the TLB, if not, then x86 needs a flush too.

x86 needs a flush_tlb_page(), yes.

> ppc and ppc64 need a flush to evict the entry from the hash table or
> we'll never set the _PAGE_ACCESSED bit anymore.
> On the other hand, I'd like to propose a semantic change here, by
> changing ptep_test_and_clear_dirty() as well so that the flush is done
> by the arch function and not explicitely by the generic code in both
> cases. (I'm not sure if it's worth adding an mm parameter to the call
> or if the arch will figure it out, we don't have it at hand in
> page_referenced()).
> That way, arch that don't need the flush (if any) can avoid it, and
> in the case of ptep_test_and_clear_dirty, I may have a better way of
> implementing it without a flush in mind.

I don't feel particularly strongly either way, but the core mm code is
sprinkled with flushes anyway; it would probably be more consistent to
open-code it in rmap.c now.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:59    [W:0.100 / U:10.088 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site