|| ||Christoph Lameter <clameter-sJ/iWh9BUns@public.gmane.org>|
|| ||Andrea Arcangeli <andrea-atKUWr5tajBWk0Htik3Jfirstname.lastname@example.org>|
|| ||[patch 0/6] [RFC] MMU Notifiers V3|
|| ||Tue, 29 Jan 2008 18:29:09 -0800|
|| ||Nick Piggin <npiggin-l3A5Bk7waGM@public.gmane.org>,
Peter Zijlstra <a.p.zijlstra-/NLkJaSkS4VmR6Xm/wNWPw@public.gmane.org>, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org,
Benjamin Herrenschmidt <benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>, steiner-sJ/iWh9BUns@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Avi Kivity <avi-atKUWr5tajBWk0Htik3Jemail@example.com>,
Robin Holt <holt-sJ/iWh9BUns@public.gmane.org>, Hugh Dickins <hugh-DTz5qymZ9yRBDgjK7y7TUQ@public.gmane.org>|
This is a patchset implementing MMU notifier callbacks based on Andrea's
earlier work. These are needed if Linux pages are referenced from something
else than tracked by the rmaps of the kernel. The known immediate users are
KVM (establishes a refcount to the page. External references called spte)
GRU (simple TLB shootdown without refcount. Has its own pagetable/tlb)
XPmem (uses its own reverse mappings and refcount. Remote ptes, Needs
to sleep when sending messages)
- Feedback from uses of the callbacks for KVM, RDMA, XPmem and GRU
Early tests with the GRU were successful.
- Pages may be freed before the external mapping are torn down
through invalidate_range() if no refcount on the page is taken.
There is the chance that page content may be visible after
they have been reallocated (mainly an issue for the GRU that
takes no refcount).
- invalidate_range() callbacks are sometimes called under i_mmap_lock.
These need to be dealt with or XPmem needs to be able to work around
- filemap_xip.c does not follow conventions for Rmap callbacks.
We could depends on XIP support not being active to avoid the issue.
Things that we leave as is:
- RCU quiescent periods are required on registering and unregistering
notifiers to guarantee visibility to other processors.
Currently only mmu_notifier_release() does the correct thing.
It is up to the user to provide RCU quiescent periods for
register/unregister functions if they are called outside of the
Andrea's mmu_notifier #4 -> RFC V1
- Merge subsystem rmap based with Linux rmap based approach
- Move Linux rmap based notifiers out of macro
- Try to account for what locks are held while the notifiers are
- Develop a patch sequence that separates out the different types of
hooks so that we can review their use.
- Avoid adding include to linux/mm_types.h
- Integrate RCU logic suggested by Peter.
- Improve RCU support
- Use mmap_sem for mmu_notifier register / unregister
- Drop invalidate_page from COW, mm/fremap.c and mm/rmap.c since we
already have invalidate_range() callbacks there.
- Clean compile for !MMU_NOTIFIER
- Isolate filemap_xip strangeness into its own diff
- Pass a the flag to invalidate_range to indicate if a spinlock
- Add invalidate_all()
- Further RCU fixes
- Fixes from Andrea to fixup aging and move invalidate_range() in do_wp_page
and sys_remap_file_pages() after the pte clearing.
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.