LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Michel Lespinasse <walken@google.com>
To: linux-mm@kvack.org, Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Hugh Dickins <hughd@google.com>, Rik van Riel <riel@redhat.com>,
Andrea Arcangeli <aarcange@redhat.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 0/2] page munlock issues when breaking up COW
Date: Mon, 7 Feb 2011 16:47:34 -0800 [thread overview]
Message-ID: <1297126056-14322-1-git-send-email-walken@google.com> (raw)
It looks like there is a race in the do_wp_page() code that munlocks the
old page after breaking up COW. The pte still points to that old page,
so I don't see that we are protected against vmscan mlocking back the
page right away. This can be easily worked around by moving that code to
the end of do_wp_page(), after the pte has been pointed to the new page.
Also, the corresponding code in __do_fault() seems entirely unnecessary,
since there was never a pte pointing to the old page in our vma.
Michel Lespinasse (2):
mlock: fix race when munlocking pages in do_wp_page()
mlock: do not munlock pages in __do_fault()
mm/memory.c | 32 ++++++++++++--------------------
1 files changed, 12 insertions(+), 20 deletions(-)
--
1.7.3.1
next reply other threads:[~2011-02-08 0:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-08 0:47 Michel Lespinasse [this message]
2011-02-08 0:47 ` [PATCH 1/2] mlock: fix race when munlocking pages in do_wp_page() Michel Lespinasse
2011-02-08 1:45 ` KAMEZAWA Hiroyuki
2011-02-08 18:28 ` Hugh Dickins
2011-02-08 0:47 ` [PATCH 2/2] mlock: do not munlock pages in __do_fault() Michel Lespinasse
2011-02-08 1:47 ` KAMEZAWA Hiroyuki
2011-02-08 18:29 ` Hugh Dickins
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=1297126056-14322-1-git-send-email-walken@google.com \
--to=walken@google.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=hughd@google.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=lee.schermerhorn@hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=riel@redhat.com \
--subject='Re: [PATCH 0/2] page munlock issues when breaking up COW' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).