From patchwork Tue Aug 23 17:54:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 9296059 X-Patchwork-Delegate: Trond.Myklebust@netapp.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8AE2A608A7 for ; Tue, 23 Aug 2016 17:54:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 81338286EA for ; Tue, 23 Aug 2016 17:54:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7663828BD5; Tue, 23 Aug 2016 17:54:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 066B028B2C for ; Tue, 23 Aug 2016 17:54:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932203AbcHWRyr (ORCPT ); Tue, 23 Aug 2016 13:54:47 -0400 Received: from mail-it0-f65.google.com ([209.85.214.65]:34178 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754500AbcHWRyq (ORCPT ); Tue, 23 Aug 2016 13:54:46 -0400 Received: by mail-it0-f65.google.com with SMTP id e63so8824041ith.1; Tue, 23 Aug 2016 10:54:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:from:to:date:message-id:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=G++yOUDpsLNpaeeTPtezZK4KcXkFl0T+fvUvVEkYJ5Y=; b=oiTmY2gl9X99e70DTZgKT+BXwhzqdlFx3ZTZshCY3WaEVEm5Y8mk5tRyf5nUJEBHLy CjhdNgcIugEsZ69yxZbDb+sEqdnwZadShWbHNHzUvOAiO6KGkJp4gPg1HYZG9nTjdSTC YdOWxQPKj9ChWo3Aa1NwGCg6/wreUA/1/+2ZinMZDyraV9G9c2wsTQNM0Pnlzf1P4kKN KxpPpMldHoue7p00+Sa0So3uBWCKL4k6NajdPyPcrGhILcp8ihgRgkMcC+d9qBHZyByY 4hYEM5zaWr72LekfOFH75vcztm21fXapLlY77yRmNA0HzoEZp+b9K0rHog72dJOEjF5g cniA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:from:to:date:message-id :in-reply-to:references:user-agent:mime-version :content-transfer-encoding; bh=G++yOUDpsLNpaeeTPtezZK4KcXkFl0T+fvUvVEkYJ5Y=; b=TYa+qYRZPhZwhR6Bdl+reekD2Gv6jw2z1ZEV/ogp6xv4H/bbQB0LtvMwQWpdXCcpwl zH5WohDuCCJOnkfLgBh9NsisfjKbReCNLANxm9qKFnJMjrIrZ/jF1HFM6RSFOL2QWAJx 3KTP0WLX6gzdLybAtzPYQAU3pN+wuGAKMZs5AyvpusXbejYu4btpFnkTMTXIHR2mAAXv tQOTmk2+zXEJcz3eKzOlZR12aI5bneP92fMiyR1T7CSaMxhto2NkOw/JyFnMKTwJ80W1 PG933DsC81NIu3r/wSdPB+foeOpIo6PW6U7V76OomJ7bKU6dkPkpJ7jYKL6FSEDB8H6z FARA== X-Gm-Message-State: AEkoouvLilHkH0Rjb2NlQdqBwce96eQ4flgPClKR43XrTBn0QtxVNzO9TXXw5sq8U7MXXQ== X-Received: by 10.36.98.199 with SMTP id d190mr13770104itc.39.1471974879855; Tue, 23 Aug 2016 10:54:39 -0700 (PDT) Received: from manet.1015granger.net ([2604:8800:100:81fc:ec4:7aff:fe6c:1dce]) by smtp.gmail.com with ESMTPSA id j16sm1766461iod.25.2016.08.23.10.54.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Aug 2016 10:54:39 -0700 (PDT) Subject: [PATCH v2 19/22] xprtrdma: Support larger inline thresholds From: Chuck Lever To: linux-rdma@vger.kernel.org, linux-nfs@vger.kernel.org Date: Tue, 23 Aug 2016 13:54:38 -0400 Message-ID: <20160823175438.13038.1624.stgit@manet.1015granger.net> In-Reply-To: <20160823174402.13038.84561.stgit@manet.1015granger.net> References: <20160823174402.13038.84561.stgit@manet.1015granger.net> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP RPC-over-RDMA Version Two will likely require at least a 4KB inline threshold by default. The Version One inline threshold is still 1KB, and it's automatically negotiated down to in rpcrdma_update_connect_private. The 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 --- include/linux/sunrpc/xprtrdma.h | 4 ++-- net/sunrpc/xprtrdma/transport.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/include/linux/sunrpc/xprtrdma.h b/include/linux/sunrpc/xprtrdma.h index 39267dc..221b7a2 100644 --- a/include/linux/sunrpc/xprtrdma.h +++ b/include/linux/sunrpc/xprtrdma.h @@ -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. */ diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c index 6a358ab..ed5e285 100644 --- a/net/sunrpc/xprtrdma/transport.c +++ b/net/sunrpc/xprtrdma/transport.c @@ -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, },