From: Rik van Riel <riel@redhat.com>
To: Avi Kivity <avi@qumranet.com>
Cc: lkml@qumranet.com, linux-mm@kvack.org, shaohua.li@intel.com,
kvm@qumranet.com, general@lists.openfabrics.org
Subject: Re: [PATCH][RFC]: pte notifiers -- support for external page tables
Date: Wed, 05 Sep 2007 15:05:24 -0400 [thread overview]
Message-ID: <46DEFDF4.5000900@redhat.com> (raw)
In-Reply-To: <11890103283456-git-send-email-avi@qumranet.com>
Avi Kivity wrote:
> This sample patch adds a new mechanism, pte notifiers, that allows drivers
> to register an interest in a changes to ptes. Whenever Linux changes a
> pte, it will call a notifier to allow the driver to adjust the external
> page table and flush its tlb.
>
> Note that only one notifier is implemented, ->clear(), but others should be
> similar.
This approach makes a lot of sense.
> diff --git a/mm/rmap.c b/mm/rmap.c
> index 41ac397..3f61d38 100644
> --- a/mm/rmap.c
> +++ b/mm/rmap.c
> @@ -682,6 +682,7 @@ static int try_to_unmap_one(struct page *page, struct vm_area_struct *vma,
> }
>
> /* Nuke the page table entry. */
> + pte_notifier_call(vma, clear, address);
> flush_cache_page(vma, address, page_to_pfn(page));
> pteval = ptep_clear_flush(vma, address, pte);
If you want this to be useful to Infiniband, you should probably
also hook up do_wp_page() in mm/memory.c, where a page table can
be pointed to another page.
Probably the code in mm/mremap.c will need to be hooked up too.
--
Politics is the struggle between those who want to make their country
the best in the world, and those who believe it already is. Each group
calls the other unpatriotic.
--
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:[~2007-09-05 19:05 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-05 16:38 Avi Kivity
2007-09-05 19:05 ` Rik van Riel [this message]
2007-09-05 19:14 ` Avi Kivity
2007-09-05 19:23 ` Rik van Riel
2007-09-05 19:32 ` Avi Kivity
2007-09-06 11:28 ` Jeremy Fitzhardinge
2007-09-05 20:40 ` Jack Steiner
2007-09-05 20:40 ` Avi Kivity
2007-09-05 20:42 ` Avi Kivity
2007-09-06 6:24 ` [ofa-general] " Gleb Natapov
2007-09-06 8:35 ` Avi Kivity
2007-09-06 8:41 ` Gleb Natapov
2007-09-10 18:17 ` Andrew Hastings
2007-09-11 10:37 ` Daniel J Blueman
2007-09-11 11:19 ` Gleb Natapov
2007-09-05 19:32 [PATCH][RFC] " Avi Kivity
2007-09-06 4:28 ` Shaohua Li
2007-09-06 8:38 ` Avi Kivity
2007-09-06 13:28 ` Andi Kleen
[not found] ` <p73myw09g5w.fsf@bingen.suse.de>
2007-09-06 15:17 ` Avi Kivity
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=46DEFDF4.5000900@redhat.com \
--to=riel@redhat.com \
--cc=avi@qumranet.com \
--cc=general@lists.openfabrics.org \
--cc=kvm@qumranet.com \
--cc=linux-mm@kvack.org \
--cc=lkml@qumranet.com \
--cc=shaohua.li@intel.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