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

David S. Miller
2004-05-25T20:57:48Z

On Tue, 25 May 2004 13:49:57 -0700 (PDT)
Linus Torvalds <torvalds@osdl.org> wrote:

> So it sounds like the SWAP loop basically ends up being just something
> like
...
> Right? Note that the reason we can do the "dirty and accessed bit both
> set" case with a simple write is exactly because that's already the
> "maximal" bits anybody can write to the thing, so we don't need to loop,
> we can just write it directly.

I believe so. So it's still possible for the mmu to write something
with less bits, ie. say we're adding dirty, we write dirty+accessed but the
TLB has the pre-dirty PTE and writes that with just the accessed bit set.

And this is exactly what you code is trying to handle. Perfect.