From: Christoph Lameter <clameter@sgi.com>
To: Robin Holt <holt@sgi.com>
Cc: Andrea Arcangeli <andrea@qumranet.com>,
Avi Kivity <avi@qumranet.com>, Izik Eidus <izike@qumranet.com>,
kvm-devel@lists.sourceforge.net,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
steiner@sgi.com, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, daniel.blueman@quadrics.com
Subject: Re: [patch 2/4] mmu_notifier: Callbacks to invalidate address ranges
Date: Fri, 1 Feb 2008 11:14:16 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.64.0802011113390.18163@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <20080201104959.GJ26420@sgi.com>
Argh. Did not see this soon enougn. Maybe this one is better since it
avoids the additional unlocks?
On Fri, 1 Feb 2008, Robin Holt wrote:
> do_wp_page can reach the _end callout without passing the _begin
> callout. This prevents making the _end unles the _begin has also
> been made.
>
> Index: mmu_notifiers-cl-v5/mm/memory.c
> ===================================================================
> --- mmu_notifiers-cl-v5.orig/mm/memory.c 2008-02-01 04:44:03.000000000 -0600
> +++ mmu_notifiers-cl-v5/mm/memory.c 2008-02-01 04:46:18.000000000 -0600
> @@ -1564,7 +1564,7 @@ static int do_wp_page(struct mm_struct *
> {
> struct page *old_page, *new_page;
> pte_t entry;
> - int reuse = 0, ret = 0;
> + int reuse = 0, ret = 0, invalidate_started = 0;
> int page_mkwrite = 0;
> struct page *dirty_page = NULL;
>
> @@ -1649,6 +1649,8 @@ gotten:
>
> mmu_notifier(invalidate_range_begin, mm, address,
> address + PAGE_SIZE, 0);
> + invalidate_started = 1;
> +
> /*
> * Re-check the pte - we dropped the lock
> */
> @@ -1687,7 +1689,8 @@ gotten:
> page_cache_release(old_page);
> unlock:
> pte_unmap_unlock(page_table, ptl);
> - mmu_notifier(invalidate_range_end, mm,
> + if (invalidate_started)
> + mmu_notifier(invalidate_range_end, mm,
> address, address + PAGE_SIZE, 0);
> if (dirty_page) {
> if (vma->vm_file)
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2008-02-01 19:14 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-01 5:04 [patch 0/4] [RFC] EMMU Notifiers V5 Christoph Lameter
2008-02-01 5:04 ` [patch 1/4] mmu_notifier: Core code Christoph Lameter
2008-02-01 10:55 ` Robin Holt
2008-02-01 11:04 ` Robin Holt
2008-02-01 19:14 ` Christoph Lameter
2008-02-01 5:04 ` [patch 2/4] mmu_notifier: Callbacks to invalidate address ranges Christoph Lameter
2008-02-01 10:49 ` Robin Holt
2008-02-01 19:14 ` Christoph Lameter [this message]
2008-02-01 22:09 ` Robin Holt
2008-02-01 23:19 ` Christoph Lameter
2008-02-01 23:35 ` Robin Holt
2008-02-02 0:05 ` Christoph Lameter
2008-02-02 0:21 ` Robin Holt
2008-02-02 0:38 ` Robin Holt
2008-02-03 2:23 ` Andrea Arcangeli
2008-02-01 5:04 ` [patch 3/4] mmu_notifier: invalidate_page callbacks Christoph Lameter
2008-02-01 5:04 ` [patch 4/4] mmu_notifier: Support for driverws with revers maps (f.e. for XPmem) Christoph Lameter
2008-02-01 11:58 ` Extending mmu_notifiers to handle __xip_unmap in a sleepable context? Robin Holt
2008-02-01 12:10 ` Robin Holt
2008-02-01 19:17 ` Christoph Lameter
2008-02-03 1:39 ` [patch 0/4] [RFC] EMMU Notifiers V5 Andrea Arcangeli
2008-02-03 13:41 ` Robin Holt
-- strict thread matches above, loose matches on Subject: below --
2008-01-25 5:56 [patch 0/4] [RFC] MMU Notifiers V1 Christoph Lameter
2008-01-25 5:56 ` [patch 2/4] mmu_notifier: Callbacks to invalidate address ranges Christoph Lameter
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=Pine.LNX.4.64.0802011113390.18163@schroedinger.engr.sgi.com \
--to=clameter@sgi.com \
--cc=a.p.zijlstra@chello.nl \
--cc=andrea@qumranet.com \
--cc=avi@qumranet.com \
--cc=daniel.blueman@quadrics.com \
--cc=holt@sgi.com \
--cc=izike@qumranet.com \
--cc=kvm-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=steiner@sgi.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;
as well as URLs for NNTP newsgroup(s).