Re: race with page_referenced_one->ptep_test_and_clear_young and pagetable setup/pulldown

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Hugh Dickins <hugh@...>
Cc: Jeremy Fitzhardinge <jeremy@...>, David Rientjes <rientjes@...>, Zachary Amsden <zach@...>, Andrew Morton <akpm@...>, Linus Torvalds <torvalds@...>, Rusty Russell <rusty@...>, Andi Kleen <ak@...>, Keir Fraser <keir@...>, Linux Kernel Mailing List <linux-kernel@...>
Date: Friday, October 5, 2007 - 2:58 pm

On Fri, 5 Oct 2007 12:36:33 +0100 (BST)
Hugh Dickins <hugh@veritas.com> wrote:


It does.  Telling Xen to pin the page as a page table page is
basically the first thing a Xen kernel does after marking the
page read-only.

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.

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.

-- 
All Rights Reversed
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
race with page_referenced_one-&gt;ptep_test_and_clear_young ..., Jeremy Fitzhardinge, (Thu Oct 4, 9:43 pm)
Re: race with page_referenced_one-&gt;ptep_test_and_clear_yo..., Jeremy Fitzhardinge, (Fri Oct 5, 3:39 pm)
Re: race with page_referenced_one->ptep_test_and_clear_yo..., Rik van Riel, (Fri Oct 5, 2:58 pm)
Re: race with page_referenced_one-&gt;ptep_test_and_clear_yo..., Jeremy Fitzhardinge, (Fri Oct 5, 3:40 pm)
Re: race with page_referenced_one-&gt;ptep_test_and_clear_yo..., Jeremy Fitzhardinge, (Fri Oct 5, 12:08 am)
Re: race with page_referenced_one-&gt;ptep_test_and_clear_yo..., Jeremy Fitzhardinge, (Fri Oct 5, 12:15 am)