lkml.org 
[lkml]   [2007]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: race with page_referenced_one->ptep_test_and_clear_young and pagetable setup/pulldown
On Fri, 5 Oct 2007 12:36:33 +0100 (BST)
Hugh Dickins <hugh@veritas.com> wrote:

> To my naive mind, your problem actually lies in those two stages:
> whatever marks the pages RO should not be keeping Xen in ignorance.

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
-
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/

\
 
 \ /
  Last update: 2007-10-05 21:01    [W:0.508 / U:25.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site