OpenCloudOS-Kernel/drivers/infiniband/ulp
Jack Wang 5e91eabf66 RDMA/rtrs-srv: Set minimal max_send_wr and max_recv_wr
Currently rtrs when create_qp use a coarse numbers (bigger in general),
which leads to hardware create more resources which only waste memory with
no benefits.

For max_send_wr, we don't really need alway max_qp_wr size when creating
qp, reduce it to cq_size.

For max_recv_wr,  cq_size is enough.

With the patch when sess_queue_depth=128, per session (2 paths) memory
consumption reduced from 188 MB to 65MB

When always_invalidate is enabled, we need send more wr, so treat it
special.

Fixes: 9cb8374804 ("RDMA/rtrs: server: main functionality")
Link: https://lore.kernel.org/r/20210614090337.29557-2-jinpu.wang@ionos.com
Signed-off-by: Jack Wang <jinpu.wang@cloud.ionos.com>
Reviewed-by: Md Haris Iqbal <haris.iqbal@cloud.ionos.com>
Signed-off-by: Gioh Kim <gi-oh.kim@ionos.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2021-06-18 13:47:12 -03:00
..
ipoib RDMA/ipoib: Use refcount_t instead of atomic_t for reference counting 2021-06-08 15:00:04 -03:00
iser RDMA/iser: struct iscsi_iser_task is declared twice 2021-03-30 19:53:08 -03:00
isert IB/isert: set rdma cm afonly flag 2021-05-28 20:24:52 -03:00
opa_vnic RDMA: Convert comma to semicolon 2021-01-07 13:53:41 -04:00
rtrs RDMA/rtrs-srv: Set minimal max_send_wr and max_recv_wr 2021-06-18 13:47:12 -03:00
srp RDMA/srp: Use DEVICE_ATTR_*() macros 2021-05-28 20:40:29 -03:00
srpt IB/srpt: Remove redundant assignment to ret 2021-05-11 13:42:17 -03:00
Makefile RDMA/rtrs: include client and server modules into kernel compilation 2020-05-17 18:57:15 -03:00