[PATCH for-next v3 7/7] RDMA/rxe: Add support for the traditional Atomic operations with ODP

2022-12-22 Thread Daisuke Matsuda
Enable 'fetch and add' and 'compare and swap' operations to manipulate data in an ODP-enabled MR. This is comprised of the following steps: 1. Check the driver page table(umem_odp->dma_list) to see if the target page is both readable and writable. 2. If not, then trigger page fault to map the

[PATCH for-next v3 6/7] RDMA/rxe: Add support for Send/Recv/Write/Read operations with ODP

2022-12-22 Thread Daisuke Matsuda
rxe_mr_copy() is used widely to copy data to/from a user MR. requester uses it to load payloads of requesting packets; responder uses it to process Send, Write, and Read operaetions; completer uses it to copy data from response packets of Read and Atomic operations to a user MR. Allow these operat

[PATCH for-next v3 5/7] RDMA/rxe: Allow registering MRs for On-Demand Paging

2022-12-22 Thread Daisuke Matsuda
Allow applications 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 supported right now. They will be enabled later in the subsequent two patches. rxe_odp_do_pagefault() is called to initialize an ODP-enab

[PATCH for-next v3 4/7] RDMA/rxe: Add page invalidation support

2022-12-22 Thread Daisuke Matsuda
On page invalidation, an MMU notifier callback is invoked to unmap DMA addresses and update the driver page table(umem_odp->dma_list). The callback is registered when an ODP-enabled MR is created. Signed-off-by: Daisuke Matsuda --- drivers/infiniband/sw/rxe/Makefile | 2 ++ drivers/infiniband/

[PATCH for-next v3 2/7] RDMA/rxe: Always schedule works before accessing user MRs

2022-12-22 Thread Daisuke Matsuda
Both responder and completer can sleep to execute page-fault when used with ODP, and page-fault handler can be invoked when they are going to access user MRs, so works must be scheduled in such cases. Signed-off-by: Daisuke Matsuda --- drivers/infiniband/sw/rxe/rxe_comp.c | 20 ++

[PATCH for-next v3 3/7] RDMA/rxe: Cleanup code for responder Atomic operations

2022-12-22 Thread Daisuke Matsuda
Currently, rxe_responder() directly calls the function to execute Atomic operations. This need to be modified to insert some conditional branches for the ODP feature. Additionally, rxe_resp.h is newly added to be used by rxe_odp.c in near future. Signed-off-by: Daisuke Matsuda --- drivers/infini

[PATCH for-next v3 0/7] On-Demand Paging on SoftRoCE

2022-12-22 Thread Daisuke Matsuda
This patch series implements the On-Demand Paging feature on SoftRoCE(rxe) driver, which has been available only in mlx5 driver[1] so far. As an important change, it is necessary to convert triple tasklets (requester, responder and completer) to workqueue because they must be able to sleep in orde

[PATCH for-next v3 1/7] RDMA/rxe: Convert triple tasklets to use workqueue

2022-12-22 Thread Daisuke Matsuda
In order to implement On-Demand Paging on the rxe driver, triple tasklets (requester, responder, and completer) must be allowed to sleep so that they can trigger page fault when pages being accessed are not present. This patch replaces the tasklets with a workqueue, but still allows direct- call o