[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080304133020.GC5301@v2.random>
Date: Tue, 4 Mar 2008 14:30:20 +0100
From: Andrea Arcangeli <andrea@...ranet.com>
To: Christoph Lameter <clameter@....com>
Cc: Jack Steiner <steiner@....com>, Nick Piggin <npiggin@...e.de>,
akpm@...ux-foundation.org, Robin Holt <holt@....com>,
Avi Kivity <avi@...ranet.com>, kvm-devel@...ts.sourceforge.net,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
general@...ts.openfabrics.org,
Steve Wise <swise@...ngridcomputing.com>,
Roland Dreier <rdreier@...co.com>,
Kanoj Sarcar <kanojsarcar@...oo.com>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
daniel.blueman@...drics.com
Subject: Re: [RFC] Notifier for Externally Mapped Memory (EMM)
On Mon, Mar 03, 2008 at 11:31:15PM -0800, Christoph Lameter wrote:
> @@ -446,6 +450,8 @@ static int page_mkclean_one(struct page
> if (address == -EFAULT)
> goto out;
>
> + /* rmap lock held */
> + emm_notify(mm, emm_invalidate_start, address, address + PAGE_SIZE);
> pte = page_check_address(page, mm, address, &ptl);
> if (!pte)
> goto out;
> @@ -462,6 +468,7 @@ static int page_mkclean_one(struct page
> }
>
> pte_unmap_unlock(pte, ptl);
> + emm_notify(mm, emm_invalidate_end, address, address + PAGE_SIZE);
> out:
> return ret;
> }
I could have ripped invalidate_page from my patch too, except I didn't
want to slow down those paths for the known-common-users when not even
GRU would get any benefit from two hooks when only one is needed.
When working with single pages it's more efficient and preferable to
call invalidate_page and only later release the VM reference on the
page.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists