From patchwork Mon Jan 23 20:53:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever III X-Patchwork-Id: 9533453 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 79BB86046A for ; Mon, 23 Jan 2017 21:02:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6BDD0283F3 for ; Mon, 23 Jan 2017 21:02:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 604812841F; Mon, 23 Jan 2017 21:02:09 +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.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=unavailable 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 13AC6283FD for ; Mon, 23 Jan 2017 21:02:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751445AbdAWVCH (ORCPT ); Mon, 23 Jan 2017 16:02:07 -0500 Received: from mail-it0-f65.google.com ([209.85.214.65]:35139 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751355AbdAWVCG (ORCPT ); Mon, 23 Jan 2017 16:02:06 -0500 Received: by mail-it0-f65.google.com with SMTP id 203so11637363ith.2; Mon, 23 Jan 2017 13:02:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:from:to:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=H66s54Syj94crHCtB5DnJbNU2QKoexZx72qDqERuYBA=; b=iBeXDcvKKTLqPuUPgzjAUw6Yn/BmR9voM1CH+85T5WROvL5QYsOal1GZO+GkMuvW/g f1d06fjq7Uvg7Xepp3dLmJEdzpfcnMV/Wkj1+oJnuyYN0GNxhKPpPr9NL3mceQr/e+TH EfPNLcjeEljhDYePdQaoVbpQHRlNx4ofN/abVU05kvUSqvCPWSZ+DR1/dbne+2bSOuzE RdAP474U4E8mJMB8W5giAtbidl5OqDKnbosrWcfFnpz6UTGc+CnhQrn5nojxD8SOX7qG kjJqdOix16/MFLrEz9WkcbWNcUsBYvsh6jFp4aGHrMW3SKUkLZ00NtkaNjGvL2jhlXsH /Qdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:from:to:cc:date:message-id :in-reply-to:references:user-agent:mime-version :content-transfer-encoding; bh=H66s54Syj94crHCtB5DnJbNU2QKoexZx72qDqERuYBA=; b=PDoIJ5fXgcglNWOe8xdDgEn3w97B8LOVN9Gc6BwChpvA3BKE6wSAeBvt2CKqf202/p 8bej3iN5TDiW4E4pzkmsjHfOZDmHzeIykik6k4qdyo/NfRaU1I6PaBmgbZMUxgEz4POf 0pmlGmuqd9mJLHZCBXAl4aFTv4IJHqatCdSfo06MvmlxM412lo0iJsmG+IxsbA1MRcy1 9+2OvCsgl8ObB02kLTUxGteZN9BcIS6XZwD2O9I8pIafT0e/1XUtOY0S3rN8LLEJtIgf fffUbldLtYT4WebRVqdELfquaVaeKewETwx1crzllnsL1G9LrvVUd5zbM1yw8Z+EZTDd gLoQ== X-Gm-Message-State: AIkVDXKOLk+b2WDSyZzeyA4YOu8L9dI5yjHzBoMAqh9sr9Hq9hkApI2anmJdKEDeU0QPmg== X-Received: by 10.36.245.5 with SMTP id k5mr17086535ith.100.1485204783821; Mon, 23 Jan 2017 12:53:03 -0800 (PST) Received: from manet.1015granger.net ([2604:8800:100:81fc:ec4:7aff:fe6c:1dce]) by smtp.gmail.com with ESMTPSA id y42sm10187688ioi.21.2017.01.23.12.53.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Jan 2017 12:53:03 -0800 (PST) Subject: [PATCH v2 3/5] xprtrdma: Disable pad optimization by default From: Chuck Lever To: anna.schumaker@netapp.com Cc: linux-rdma@vger.kernel.org, linux-nfs@vger.kernel.org Date: Mon, 23 Jan 2017 15:53:02 -0500 Message-ID: <20170123205302.21699.89801.stgit@manet.1015granger.net> In-Reply-To: <20170123205159.21699.47373.stgit@manet.1015granger.net> References: <20170123205159.21699.47373.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 Commit d5440e27d3e5 ('xprtrdma: Enable pad optimization') made the Linux client omit XDR round-up padding in normal Read and Write chunks so that the client doesn't have to register and invalidate 3-byte memory regions that contain no real data. Unfortunately, my cheery 2014 assessment that this optimization "is supported now by both Linux and Solaris servers" was premature. We've found bugs in Solaris in this area since commit d5440e27d3e5 was merged (SYMLINK is the main culprit). So for maximum interoperability, I'm disabling this optimization again. If a CM private message is exchanged when connecting, the client recognizes that the server is Linux, and enables the optimization for that connection. Until now the Solaris server bugs did not impact common operations, and were thus largely unnoticed. Soon, less capable devices on Linux NFS/RDMA clients will make use of Read chunks more often, and these Solaris bugs will prevent interoperation in more cases. Signed-off-by: Chuck Lever --- net/sunrpc/xprtrdma/transport.c | 2 +- net/sunrpc/xprtrdma/verbs.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) -- 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/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c index 534c178..6990581 100644 --- a/net/sunrpc/xprtrdma/transport.c +++ b/net/sunrpc/xprtrdma/transport.c @@ -67,7 +67,7 @@ static unsigned int xprt_rdma_max_inline_write = RPCRDMA_DEF_INLINE; static unsigned int xprt_rdma_inline_write_padding; static unsigned int xprt_rdma_memreg_strategy = RPCRDMA_FRMR; - int xprt_rdma_pad_optimize = 1; + int xprt_rdma_pad_optimize = 0; #if IS_ENABLED(CONFIG_SUNRPC_DEBUG) diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c index 2a6a367..23f4da4 100644 --- a/net/sunrpc/xprtrdma/verbs.c +++ b/net/sunrpc/xprtrdma/verbs.c @@ -216,6 +216,7 @@ pmsg->cp_magic == rpcrdma_cmp_magic && pmsg->cp_version == RPCRDMA_CMP_VERSION) { r_xprt->rx_ia.ri_reminv_expected = true; + r_xprt->rx_ia.ri_implicit_roundup = true; rsize = rpcrdma_decode_buffer_size(pmsg->cp_send_size); wsize = rpcrdma_decode_buffer_size(pmsg->cp_recv_size); }