Messages in this thread | | | Date | Fri, 26 Dec 2003 09:59:09 -0800 (PST) | From | Linus Torvalds <> | Subject | Re: Page aging broken in 2.6 |
| |
On Fri, 26 Dec 2003, Benjamin Herrenschmidt wrote: > > 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.
This was very much done on purpose. The theory is, that if you're low on memory and have a lot of pages mapped, you will see enough TLB trashing for this to not matter.
And if you aren't low on memory, or don't have a lot of pages mapped, it _also_ doesn't matter.
> ppc and ppc64 need a flush to evict the entry from the hash table or > we'll never set the _PAGE_ACCESSED bit anymore.
Yeah, all hail bad MMU's.
Hash tables may need some kind of "not very urgent TLB flush" thing, so that it doesn't penalize sane architectures.
Linus - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |