Re: Page aging broken in 2.6

From: Russell King
Date: Fri Dec 26 2003 - 04:36:12 EST


On Thu, Dec 25, 2003 at 11:40:23PM -0800, Andrew Morton wrote:
> Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> wrote:
> > 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.

ARM would strictly need the flush as well. I seem to vaguely remember,
however, that when this code went in there was some discussion about
this very topic, and it was decided that the flush was not critical.

Indeed, 2.4 seems to have the same logic concerning not flushing the
PTE:

/* Don't look at this pte if it's been accessed recently. */
if ((vma->vm_flags & VM_LOCKED) || ptep_test_and_clear_young(page_table)) {
mark_page_accessed(page);
return 0;
}


--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/