diff options
author | Gioh Kim <gi-oh.kim@cloud.ionos.com> | 2021-05-28 13:30:03 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2021-05-29 01:52:58 +0200 |
commit | 3a98ea7041b7d18ac356da64823c2ba2f8391b3e (patch) | |
tree | aa9fca78fc05517ce79e9b08c2b03cbbf06daad8 | |
parent | RDMA/rtrs-srv: Clean up the code in __rtrs_srv_change_state (diff) | |
download | linux-3a98ea7041b7d18ac356da64823c2ba2f8391b3e.tar.xz linux-3a98ea7041b7d18ac356da64823c2ba2f8391b3e.zip |
RDMA/rtrs: Change MAX_SESS_QUEUE_DEPTH
Max IB immediate data size is 2^28 (MAX_IMM_PAYL_BITS)
and the minimum chunk size is 4096 (2^12).
Therefore the maximum sess_queue_depth is 65536 (2^16).
Link: https://lore.kernel.org/r/20210528113018.52290-6-jinpu.wang@ionos.com
Signed-off-by: Gioh Kim <gi-oh.kim@ionos.com>
Signed-off-by: Jack Wang <jinpu.wang@ionos.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
-rw-r--r-- | drivers/infiniband/ulp/rtrs/rtrs-pri.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/infiniband/ulp/rtrs/rtrs-pri.h b/drivers/infiniband/ulp/rtrs/rtrs-pri.h index 86e65cf30cab..d957bbf1ddd3 100644 --- a/drivers/infiniband/ulp/rtrs/rtrs-pri.h +++ b/drivers/infiniband/ulp/rtrs/rtrs-pri.h @@ -47,12 +47,15 @@ enum { MAX_PATHS_NUM = 128, /* - * With the size of struct rtrs_permit allocated on the client, 4K - * is the maximum number of rtrs_permits we can allocate. This number is - * also used on the client to allocate the IU for the user connection - * to receive the RDMA addresses from the server. + * Max IB immediate data size is 2^28 (MAX_IMM_PAYL_BITS) + * and the minimum chunk size is 4096 (2^12). + * So the maximum sess_queue_depth is 65536 (2^16) in theory. + * But mempool_create, create_qp and ib_post_send fail with + * "cannot allocate memory" error if sess_queue_depth is too big. + * Therefore the pratical max value of sess_queue_depth is + * somewhere between 1 and 65536 and it depends on the system. */ - MAX_SESS_QUEUE_DEPTH = 4096, + MAX_SESS_QUEUE_DEPTH = 65536, RTRS_HB_INTERVAL_MS = 5000, RTRS_HB_MISSED_MAX = 5, |