From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Rik van Riel <riel@redhat.com>
Cc: Hugh Dickins <hugh@veritas.com>,
David Rientjes <rientjes@google.com>,
Zachary Amsden <zach@vmware.com>,
Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Rusty Russell <rusty@rustcorp.com.au>, Andi Kleen <ak@suse.de>,
Keir Fraser <keir@xensource.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: race with page_referenced_one->ptep_test_and_clear_young and pagetable setup/pulldown
Date: Fri, 05 Oct 2007 12:40:05 -0700 [thread overview]
Message-ID: <47069315.8030802@goop.org> (raw)
In-Reply-To: <20071005145828.17ba9c69@cuia.boston.redhat.com>
Rik van Riel wrote:
> 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.
> 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
next prev parent reply other threads:[~2007-10-05 19:40 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-05 1:43 race with page_referenced_one->ptep_test_and_clear_young and pagetable setup/pulldown Jeremy Fitzhardinge
2007-10-05 1:52 ` Rik van Riel
2007-10-05 4:15 ` Jeremy Fitzhardinge
2007-10-05 13:17 ` Rik van Riel
2007-10-05 2:44 ` Andrew Morton
2007-10-05 4:08 ` Jeremy Fitzhardinge
2007-10-07 9:52 ` Nick Piggin
2007-10-05 11:36 ` Hugh Dickins
2007-10-05 18:58 ` Rik van Riel
2007-10-05 19:40 ` Jeremy Fitzhardinge [this message]
2007-10-05 19:56 ` Rik van Riel
2007-10-05 19:39 ` Jeremy Fitzhardinge
[not found] <C32B9BEC.E711%keir@xensource.com>
2007-10-05 8:03 ` Andi Kleen
2007-10-05 9:05 ` Jeremy Fitzhardinge
2007-10-05 9:15 ` Keir Fraser
2007-10-05 15:33 ` Hugh Dickins
2007-10-05 15:46 ` Keir Fraser
2007-10-05 16:48 ` Jeremy Fitzhardinge
2007-10-05 20:35 ` Jeremy Fitzhardinge
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47069315.8030802@goop.org \
--to=jeremy@goop.org \
--cc=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=hugh@veritas.com \
--cc=keir@xensource.com \
--cc=linux-kernel@vger.kernel.org \
--cc=riel@redhat.com \
--cc=rientjes@google.com \
--cc=rusty@rustcorp.com.au \
--cc=torvalds@linux-foundation.org \
--cc=zach@vmware.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox