Re: please revert bogus patch to vmscan.c

Paul Mackerras
2001-10-29T23:51:41Z

Benjamin LaHaise writes:

> The following:
>
> @@ -50,7 +50,6 @@
>
> /* Don't look at this pte if it's been accessed recently. */
> if (ptep_test_and_clear_young(page_table)) {
> - flush_tlb_page(vma, address);
> mark_page_accessed(page);
> return 0;
> }
>
> is completely bogus. Without the tlb flush, the system may never update
> the accessed bit on a page that is heavily being used.

On PPC, the page wouldn't even need to be being heavily used. Most
PPCs have an MMU hash table that we use as a level-2 cache for the
TLB. With this change, we won't see the accessed bit being set again
for any page unless there is so much memory in use that we start
evicting PTEs from the hash table, and that is very rare in practice.

So I'm with Ben on this one.

Paul.