diff options
author | Shachar Raindel <raindel@mellanox.com> | 2014-12-11 10:04:17 -0500 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-12-15 21:13:36 -0500 |
commit | 8ada2c1c0c1d75a60723cd2ca7d49c594a146af6 (patch) | |
tree | a80d10bb8cf4888a7f6313698a40980de5724b51 /include/rdma/ib_umem.h | |
parent | 860f10a799c83e38a69d5a69d80da5312a4c4106 (diff) |
IB/core: Add support for on demand paging regions
* Extend the umem struct to keep the ODP related data.
* Allocate and initialize the ODP related information in the umem
(page_list, dma_list) and freeing as needed in the end of the run.
* Store a reference to the process PID struct in the ucontext. Used to
safely obtain the task_struct and the mm during fault handling,
without preventing the task destruction if needed.
* Add 2 helper functions: ib_umem_odp_map_dma_pages and
ib_umem_odp_unmap_dma_pages. These functions get the DMA addresses
of specific pages of the umem (and, currently, pin them).
* Support for page faults only - IB core will keep the reference on
the pages used and call put_page when freeing an ODP umem
area. Invalidations support will be added in a later patch.
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Shachar Raindel <raindel@mellanox.com>
Signed-off-by: Haggai Eran <haggaie@mellanox.com>
Signed-off-by: Majd Dibbiny <majd@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'include/rdma/ib_umem.h')
-rw-r--r-- | include/rdma/ib_umem.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/rdma/ib_umem.h b/include/rdma/ib_umem.h index a51f4091489a..2d83cfd7e6ce 100644 --- a/include/rdma/ib_umem.h +++ b/include/rdma/ib_umem.h | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/workqueue.h> | 38 | #include <linux/workqueue.h> |
39 | 39 | ||
40 | struct ib_ucontext; | 40 | struct ib_ucontext; |
41 | struct ib_umem_odp; | ||
41 | 42 | ||
42 | struct ib_umem { | 43 | struct ib_umem { |
43 | struct ib_ucontext *context; | 44 | struct ib_ucontext *context; |
@@ -50,6 +51,7 @@ struct ib_umem { | |||
50 | struct pid *pid; | 51 | struct pid *pid; |
51 | struct mm_struct *mm; | 52 | struct mm_struct *mm; |
52 | unsigned long diff; | 53 | unsigned long diff; |
54 | struct ib_umem_odp *odp_data; | ||
53 | struct sg_table sg_head; | 55 | struct sg_table sg_head; |
54 | int nmap; | 56 | int nmap; |
55 | int npages; | 57 | int npages; |