Rik van Riel wrote:
quoted text > This makes for a narrow race window, during which ptep_test_and_clear_young
> cannot clear the referenced bit and may end up causing a crash. We do not
> care about it not clearing the referenced bit during that window, since it
> will be cleared during the next go-around and the race is very rare.
>
Is this the only possible case? It's just the one I found while testing
under high memory pressure.
quoted text > Hence, the only thing we need to fix is the crash.
>
> We can do that by adding an entry for ptep_test_and_clear_young to the
> exception table. This way we do not need to turn this into a new paravirt
> ops hook (since the fast path is exactly the same as x86 native) and there
> is no need for added complexity.
>
> Also, Xen would not conflict with SPLIT_PTLOCK_CPUS.
>
Well, isn't the correct fix to make Xen take all the pagetable locks
while pinning/unpinning? Adding exception handling to
test_and_clear_bit would solve this particular race, but are there
others (either now or potentially)? Seems fragile.
J
-
unsubscribe notice 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/
Messages in current thread:
Re: race with page_referenced_one->ptep_test_and_clear_you ... , Jeremy Fitzhardinge , (Fri Oct 5, 12:40 pm)