Re: race with page_referenced_one->ptep_test_and_clear_young andpagetable setup/pulldown

From: Rik van Riel
Date: Fri Oct 05 2007 - 09:17:57 EST


On Thu, 04 Oct 2007 21:15:18 -0700
Jeremy Fitzhardinge <jeremy@xxxxxxxx> wrote:

> Rik van Riel wrote:
> > Either of these two would work. Another alternative could be to
> > let test_and_clear_pte_flags have an exception table entry, where
> > we jump right to the next instruction if the instruction clearing
> > the flag fails.
> >
> > That is the essentially variant you need for Xen, except the fast
> > path is still exactly the same it is as when running on native
> > hardware.
> >
>
> Hm, that wouldn't end up clearing the bit.

Big deal. We don't care *that* much.

As long as the bit gets cleared 99.9% of the time, we're fine.
All that bit is for is determining when to swap out a page.

--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan
-
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/