From: Avi Kivity <avi@qumranet.com>
To: Christoph Lameter <clameter@sgi.com>
Cc: akpm@linux-foundation.org, Nick Piggin <npiggin@suse.de>,
Andrea Arcangeli <andrea@qumranet.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
kvm-devel@lists.sourceforge.net, Jack Steiner <steiner@sgi.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Robin Holt <holt@sgi.com>,
general@lists.openfabrics.org
Subject: Re: [kvm-devel] Notifier for Externally Mapped Memory (EMM) V1
Date: Thu, 06 Mar 2008 08:12:01 +0200 [thread overview]
Message-ID: <47CF8B31.6040001@qumranet.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0803051600470.7481@schroedinger.engr.sgi.com>
Christoph Lameter wrote:
>
> /*
> + * Notifier for devices establishing their own references to Linux
> + * kernel pages in addition to the regular mapping via page
> + * table and rmap. The notifier allows the device to drop the mapping
> + * when the VM removes references to pages.
> + */
> +enum emm_operation {
> + emm_release, /* Process existing, */
> + emm_invalidate_start, /* Before the VM unmaps pages */
> + emm_invalidate_end, /* After the VM unmapped pages */
> + emm_referenced /* Check if a range was referenced */
> +};
>
Check and clear
btw, a similar test and clear dirty would be useful as well, no?
> +
> +struct emm_notifier {
> + int (*callback)(struct emm_notifier *e, struct mm_struct *mm,
> + enum emm_operation op,
> + unsigned long start, unsigned long end);
> + struct emm_notifier *next;
> +};
> +
>
It is cleaner for the user to specify individual callbacks instead of
having a switch.
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
--
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-03-06 6:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-06 0:22 Christoph Lameter
2008-03-06 6:12 ` Avi Kivity [this message]
2008-03-07 19:12 ` Andrea Arcangeli
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=47CF8B31.6040001@qumranet.com \
--to=avi@qumranet.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=andrea@qumranet.com \
--cc=clameter@sgi.com \
--cc=general@lists.openfabrics.org \
--cc=holt@sgi.com \
--cc=kvm-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=npiggin@suse.de \
--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