]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
xprtrdma: Support larger inline thresholds
authorChuck Lever <chuck.lever@oracle.com>
Thu, 15 Sep 2016 14:57:32 +0000 (10:57 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Mon, 19 Sep 2016 17:08:38 +0000 (13:08 -0400)
The Version One default inline threshold is still 1KB. But allow
testing with thresholds up to 64KB.

This maximum is somewhat arbitrary. There's no fundamental
architectural limit I'm aware of, but it's good to keep the size of
Receive buffers reasonable. Now that Send can use a s/g list, a
Send buffer is only as large as each RPC requires. Receive buffers
are always the size of the inline threshold, however.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
include/linux/sunrpc/xprtrdma.h
net/sunrpc/xprtrdma/transport.c

index 39267dc3486af5417f1f0642d353ec65d1e78aa5..221b7a2e5406e2e3ba72e5ba8dac3c17c11bbfea 100644 (file)
@@ -53,8 +53,8 @@
 #define RPCRDMA_MAX_SLOT_TABLE (256U)
 
 #define RPCRDMA_MIN_INLINE  (1024)     /* min inline thresh */
-#define RPCRDMA_DEF_INLINE  (1024)     /* default inline thresh */
-#define RPCRDMA_MAX_INLINE  (3068)     /* max inline thresh */
+#define RPCRDMA_DEF_INLINE  (4096)     /* default inline thresh */
+#define RPCRDMA_MAX_INLINE  (65536)    /* max inline thresh */
 
 /* Memory registration strategies, by number.
  * This is part of a kernel / user space API. Do not remove. */
index 6a358ab6ce27a45ad77469ea0807beb147cbff46..ed5e285fd2ea7f6f26bf08d2d1e8d28db7823f63 100644 (file)
@@ -97,7 +97,7 @@ static struct ctl_table xr_tunables_table[] = {
                .data           = &xprt_rdma_max_inline_read,
                .maxlen         = sizeof(unsigned int),
                .mode           = 0644,
-               .proc_handler   = proc_dointvec,
+               .proc_handler   = proc_dointvec_minmax,
                .extra1         = &min_inline_size,
                .extra2         = &max_inline_size,
        },
@@ -106,7 +106,7 @@ static struct ctl_table xr_tunables_table[] = {
                .data           = &xprt_rdma_max_inline_write,
                .maxlen         = sizeof(unsigned int),
                .mode           = 0644,
-               .proc_handler   = proc_dointvec,
+               .proc_handler   = proc_dointvec_minmax,
                .extra1         = &min_inline_size,
                .extra2         = &max_inline_size,
        },