linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [ofa-general] [patch 0/9] [RFC] EMM Notifier V2
@ 2008-04-01 20:55 Christoph Lameter
  2008-04-01 20:55 ` [patch 1/9] EMM Notifier: The notifier calls Christoph Lameter
                   ` (8 more replies)
  0 siblings, 9 replies; 46+ messages in thread
From: Christoph Lameter @ 2008-04-01 20:55 UTC (permalink / raw)
  To: Hugh Dickins
  Cc: steiner, Andrea Arcangeli, Peter Zijlstra, linux-mm, Izik Eidus,
	Kanoj Sarcar, Roland Dreier, linux-kernel, Avi Kivity, kvm-devel,
	daniel.blueman, Robin Holt, general

[Note that I will be giving talks next week at the OpenFabrics Forum
and at the Linux Collab Summit in Austin on memory pinning etc. It would
be great if I could get some feedback on the approach then]

V1->V2:
- Additional optimizations in the VM
- Convert vm spinlocks to rw sems.
- Add XPMEM driver (requires sleeping in callbacks)
- Add XPMEM example

This patch implements a simple callback for device drivers that establish
their own references to pages (KVM, GRU, XPmem, RDMA/Infiniband, DMA engines
etc). These references are unknown to the VM (therefore external).

With these callbacks it is possible for the device driver to release external
references when the VM requests it. This enables swapping, page migration and
allows support of remapping, permission changes etc etc for the externally
mapped memory.

With this functionality it becomes also possible to avoid pinning or mlocking
pages (commonly done to stop the VM from unmapping device mapped pages).

A device driver must subscribe to a process using

        emm_register_notifier(struct emm_notifier *, struct mm_struct *)


The VM will then perform callbacks for operations that unmap or change
permissions of pages in that address space. When the process terminates
the callback function is called with emm_release.

Callbacks are performed before and after the unmapping action of the VM.

        emm_invalidate_start    before

        emm_invalidate_end      after

The device driver must hold off establishing new references to pages
in the range specified between a callback with emm_invalidate_start and
the subsequent call with emm_invalidate_end set. This allows the VM to
ensure that no concurrent driver actions are performed on an address
range while performing remapping or unmapping operations.


This patchset contains additional modifications needed to ensure
that the callbacks can sleep. For that purpose two key locks in the vm
need to be converted to rw_sems. These patches are brand new, invasive
and need extensive discussion and evaluation.

The first patch alone may be applied if callbacks in atomic context are
sufficient for a device driver (likely the case for KVM and GRU and simple
DMA drivers).

Following the VM modifications is the XPMEM device driver that allows sharing
of memory between processes running on different instances of Linux. This is
also a prototype. It is known to run trivial sample programs included as the
last patch.

-- 

^ permalink raw reply	[flat|nested] 46+ messages in thread

end of thread, other threads:[~2008-04-07  6:02 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-01 20:55 [ofa-general] [patch 0/9] [RFC] EMM Notifier V2 Christoph Lameter
2008-04-01 20:55 ` [patch 1/9] EMM Notifier: The notifier calls Christoph Lameter
2008-04-02  6:49   ` [ofa-general] " Andrea Arcangeli
2008-04-02 10:59     ` Robin Holt
2008-04-02 11:16       ` Andrea Arcangeli
2008-04-02 14:26         ` Robin Holt
2008-04-02 17:59     ` [ofa-general] " Christoph Lameter
2008-04-02 19:03       ` [ofa-general] EMM: Fixup return value handling of emm_notify() Christoph Lameter
2008-04-02 21:25         ` [ofa-general] " Andrea Arcangeli
2008-04-02 21:33           ` Christoph Lameter
2008-04-03 10:40             ` Peter Zijlstra
2008-04-03 15:00               ` Andrea Arcangeli
2008-04-03 19:14               ` Christoph Lameter
2008-04-02 21:05       ` [ofa-general] EMM: Require single threadedness for registration Christoph Lameter
2008-04-02 22:01         ` [ofa-general] " Andrea Arcangeli
2008-04-02 22:06           ` Christoph Lameter
2008-04-02 22:17             ` Andrea Arcangeli
2008-04-02 22:41               ` Christoph Lameter
2008-04-03  1:24               ` EMM: disable other notifiers before register and unregister Christoph Lameter
2008-04-03 10:40                 ` [ofa-general] " Peter Zijlstra
2008-04-03 15:29                 ` Andrea Arcangeli
2008-04-03 19:20                   ` [ofa-general] " Christoph Lameter
2008-04-03 20:23                     ` Christoph Lameter
2008-04-04 12:30                     ` Andrea Arcangeli
2008-04-04 20:20                     ` [ofa-general] [PATCH] mmu notifier #v11 Andrea Arcangeli
2008-04-04 22:06                       ` Christoph Lameter
2008-04-05  0:23                         ` [ofa-general] " Andrea Arcangeli
2008-04-07  5:45                           ` Christoph Lameter
2008-04-07  6:02                             ` [ofa-general] " Andrea Arcangeli
2008-04-02 21:53       ` [ofa-general] Re: [patch 1/9] EMM Notifier: The notifier calls Andrea Arcangeli
2008-04-02 21:54         ` Christoph Lameter
2008-04-02 22:09           ` Andrea Arcangeli
2008-04-02 23:04             ` Christoph Lameter
2008-04-01 20:55 ` [ofa-general] [patch 2/9] Move tlb flushing into free_pgtables Christoph Lameter
2008-04-01 20:55 ` [ofa-general] [patch 3/9] Convert i_mmap_lock to i_mmap_sem Christoph Lameter
2008-04-01 20:55 ` [patch 4/9] Remove tlb pointer from the parameters of unmap vmas Christoph Lameter
2008-04-01 20:55 ` [patch 5/9] Convert anon_vma lock to rw_sem and refcount Christoph Lameter
2008-04-02 17:50   ` Andrea Arcangeli
2008-04-02 18:15     ` Christoph Lameter
2008-04-02 21:56       ` [ofa-general] " Andrea Arcangeli
2008-04-02 21:56         ` Christoph Lameter
2008-04-02 22:12           ` Andrea Arcangeli
2008-04-01 20:55 ` [patch 6/9] This patch exports zap_page_range as it is needed by XPMEM Christoph Lameter
2008-04-01 20:55 ` [patch 7/9] Locking rules for taking multiple mmap_sem locks Christoph Lameter
2008-04-01 20:55 ` [patch 8/9] XPMEM: The device driver Christoph Lameter
2008-04-01 20:55 ` [patch 9/9] XPMEM: Simple example Christoph Lameter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox