[Devel] [PATCH RHEL8 COMMIT] fs/fuse kio: always use memory registrations for iWarp RDMA reads

Konstantin Khorenko khorenko at virtuozzo.com
Fri Apr 23 11:54:59 MSK 2021


The commit is pushed to "branch-rh8-4.18.0-240.1.1.vz8.5.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-240.1.1.vz8.5.19
------>
commit 52378a440fff0f07f691df3f15d74ffbd850945a
Author: Ildar Ismagilov <ildar.ismagilov at virtuozzo.com>
Date:   Fri Apr 23 11:54:59 2021 +0300

    fs/fuse kio: always use memory registrations for iWarp RDMA reads
    
    Currently iWarp devices don't support RMDA read operations wihtout
    registration of memeory regions, therefore we use fallback mode.
    
    Without this patch, we can also disable such opperations through
    sysfs 'echo 0 > /sys/module/fuse_kio_pcs/parameters/rdmaio_use_dma_mr_for_rdma_rw'.
    
    Signed-off-by: Ildar Ismagilov <ildar.ismagilov at virtuozzo.com>
    
    Signed-off-by: Ildar Ismagilov <ildar.ismagilov at virtuozzo.com>
---
 fs/fuse/kio/pcs/pcs_rdma_io.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/fuse/kio/pcs/pcs_rdma_io.c b/fs/fuse/kio/pcs/pcs_rdma_io.c
index cec3e556a7bf..fe63cef7761e 100644
--- a/fs/fuse/kio/pcs/pcs_rdma_io.c
+++ b/fs/fuse/kio/pcs/pcs_rdma_io.c
@@ -430,7 +430,8 @@ static int rio_submit_rdma_read(struct pcs_rdmaio *rio, struct pcs_msg *msg,
 	tx->msg = msg;
 	tx->xid = rb->xid;
 
-	if (rdmaio_use_dma_mr_for_rdma_rw) {
+	if (rdmaio_use_dma_mr_for_rdma_rw &&
+	    !rdma_protocol_iwarp(rio->cmid->device, rio->cmid->qp->port)) {
 		if (pcs_rdma_rw_init_from_msg(&tx->rdma_rw, rio->cmid->device,
 					      DMA_FROM_DEVICE, rb->rbuf, rb->rkey,
 					      rio->dev->pd->local_dma_lkey, msg, offset,


More information about the Devel mailing list