]> www.infradead.org Git - nvme.git/commit
RDMA/rxe: Allow registering MRs for On-Demand Paging
authorDaisuke Matsuda <matsuda-daisuke@fujitsu.com>
Fri, 20 Dec 2024 10:09:34 +0000 (19:09 +0900)
committerJason Gunthorpe <jgg@nvidia.com>
Fri, 21 Feb 2025 17:07:43 +0000 (13:07 -0400)
commitd03fb5c6599e31b90c6b5f65d43d6ccc6b49eb91
treede8c9f67d499dae79f203976ff8e50424bc4ad59
parentb601792392f9fe8d9d1ae9028ca61d0f70ffb986
RDMA/rxe: Allow registering MRs for On-Demand Paging

Allow userspace to register an ODP-enabled MR, in which case the flag
IB_ACCESS_ON_DEMAND is passed to rxe_reg_user_mr(). However, there is no
RDMA operation enabled right now. They will be supported later in the
subsequent two patches.

rxe_odp_do_pagefault() is called to initialize an ODP-enabled MR. It syncs
process address space from the CPU page table to the driver page table
(dma_list/pfn_list in umem_odp) when called with RXE_PAGEFAULT_SNAPSHOT
flag. Additionally, It can be used to trigger page fault when pages being
accessed are not present or do not have proper read/write permissions, and
possibly to prefetch pages in the future.

Link: https://patch.msgid.link/r/20241220100936.2193541-4-matsuda-daisuke@fujitsu.com
Signed-off-by: Daisuke Matsuda <matsuda-daisuke@fujitsu.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/sw/rxe/rxe.c
drivers/infiniband/sw/rxe/rxe_loc.h
drivers/infiniband/sw/rxe/rxe_mr.c
drivers/infiniband/sw/rxe/rxe_odp.c
drivers/infiniband/sw/rxe/rxe_resp.c
drivers/infiniband/sw/rxe/rxe_verbs.c