提交 ded8d196 编写于 作者: C Chuck Lever 提交者: J. Bruce Fields

svcrdma: Reduce size of sge array in struct svc_rdma_op_ctxt

The sge array in struct svc_rdma_op_ctxt is no longer used for
sending RDMA Write WRs. It need only accommodate the construction of
Send and Receive WRs. The maximum inline size is the largest payload
it needs to handle now.
Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
Reviewed-by: NSagi Grimberg <sagi@grimberg.me>
Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
上级 f5821c76
...@@ -48,6 +48,12 @@ ...@@ -48,6 +48,12 @@
#include <rdma/rdma_cm.h> #include <rdma/rdma_cm.h>
#define SVCRDMA_DEBUG #define SVCRDMA_DEBUG
/* Default and maximum inline threshold sizes */
enum {
RPCRDMA_DEF_INLINE_THRESH = 4096,
RPCRDMA_MAX_INLINE_THRESH = 65536
};
/* RPC/RDMA parameters and stats */ /* RPC/RDMA parameters and stats */
extern unsigned int svcrdma_ord; extern unsigned int svcrdma_ord;
extern unsigned int svcrdma_max_requests; extern unsigned int svcrdma_max_requests;
...@@ -86,7 +92,7 @@ struct svc_rdma_op_ctxt { ...@@ -86,7 +92,7 @@ struct svc_rdma_op_ctxt {
int count; int count;
unsigned int mapped_sges; unsigned int mapped_sges;
struct ib_send_wr send_wr; struct ib_send_wr send_wr;
struct ib_sge sge[RPCSVC_MAXPAGES]; struct ib_sge sge[1 + RPCRDMA_MAX_INLINE_THRESH / PAGE_SIZE];
struct page *pages[RPCSVC_MAXPAGES]; struct page *pages[RPCSVC_MAXPAGES];
}; };
...@@ -186,7 +192,6 @@ struct svcxprt_rdma { ...@@ -186,7 +192,6 @@ struct svcxprt_rdma {
* page size of 4k, or 32k * 2 ops / 4k = 16 outstanding RDMA_READ. */ * page size of 4k, or 32k * 2 ops / 4k = 16 outstanding RDMA_READ. */
#define RPCRDMA_ORD (64/4) #define RPCRDMA_ORD (64/4)
#define RPCRDMA_MAX_REQUESTS 32 #define RPCRDMA_MAX_REQUESTS 32
#define RPCRDMA_MAX_REQ_SIZE 4096
/* Typical ULP usage of BC requests is NFSv4.1 backchannel. Our /* Typical ULP usage of BC requests is NFSv4.1 backchannel. Our
* current NFSv4.1 implementation supports one backchannel slot. * current NFSv4.1 implementation supports one backchannel slot.
......
...@@ -58,9 +58,9 @@ unsigned int svcrdma_max_requests = RPCRDMA_MAX_REQUESTS; ...@@ -58,9 +58,9 @@ unsigned int svcrdma_max_requests = RPCRDMA_MAX_REQUESTS;
unsigned int svcrdma_max_bc_requests = RPCRDMA_MAX_BC_REQUESTS; unsigned int svcrdma_max_bc_requests = RPCRDMA_MAX_BC_REQUESTS;
static unsigned int min_max_requests = 4; static unsigned int min_max_requests = 4;
static unsigned int max_max_requests = 16384; static unsigned int max_max_requests = 16384;
unsigned int svcrdma_max_req_size = RPCRDMA_MAX_REQ_SIZE; unsigned int svcrdma_max_req_size = RPCRDMA_DEF_INLINE_THRESH;
static unsigned int min_max_inline = 4096; static unsigned int min_max_inline = RPCRDMA_DEF_INLINE_THRESH;
static unsigned int max_max_inline = 65536; static unsigned int max_max_inline = RPCRDMA_MAX_INLINE_THRESH;
atomic_t rdma_stat_recv; atomic_t rdma_stat_recv;
atomic_t rdma_stat_read; atomic_t rdma_stat_read;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册