Re: [PATCH] ppc64: Fix possible race with set_pte on a present PTE

Linus Torvalds
2004-05-25T04:59:36Z

On Tue, 25 May 2004, Andrea Arcangeli wrote:
>
> no, that's not what I remeber from alpha, alpha always sets the young
> bit as soon as it sets the pte from non-null to something.

Yes.

However, whtn the page is _aged_ later, the young bits will be cleared.

And _that_ is when you will now start getting infinite page faults,
because with your patch the young bits will never be set again on a normal
read.

See what I'm saying?

Your patch literally leaves the page table alone on pure reads. Which is
not acceptable, since the page being marked old was what caused the
read-fault in the first place.

But yes, pages will be young by default, so you won't ever actually _see_
this behaviour until you start having memory pressure and VM reclaim
starts trying to age the things.

Linus