Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4158135pxu; Wed, 9 Dec 2020 09:43:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJxcsF6EILryJJNa/fVedgO+Hzrf1bA8N6C4a5hXRPViOMA7Xq8Vuc9xnB9rRe1CxZFxJr+1 X-Received: by 2002:a05:6402:21f5:: with SMTP id ce21mr2987877edb.83.1607535803711; Wed, 09 Dec 2020 09:43:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607535803; cv=none; d=google.com; s=arc-20160816; b=Jz7U8RBkZJwdXyqezDWpM9TM2KHMP9+Pv0VyxUFEav6rO4s+MEs0U1XfsUtSxHpPfh 49MSC3pFhz5mvotbg6HPP4tTX5RM87zLL07ek4MGG1EyKg65Oo4fVMlay3z4a137oe1o g8UJv5DuKg/ZPMWCxgRH7hlHUxKawgMfrO8My99LINRNQsD5z4Kuhb2OyZZ9jwNmDA2p HsfH0+CJgRFGq30rJGbSFa91ZUKM1Db0go9+FCtsYszExGr7/xiyv1yv9SFyjqyYD0rn +lJft5X52FVfKJXf3ZL6Qv9RQEMefuWOOsNvgMWyvspv6/qhQLhoEUVHcv9N1LYk71iJ gXxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=sBZzAfNzfOou0B8fifSYJ0Zgmw/sL+t1Bu/8GF9krME=; b=ksvUcDo+TrEVFitFO9gtuK7PB9QdGP/A1C+rZ8xXoHYXR9KKLvLxgQQOTCqA9zSQd5 AVLoXYxKBB6MLQuDQf9XZczTt0wbk11PhjsANUdoow+a19fpCQs2vDKd1p+xFDT6Xodw q8OTCCnxJFxJQ7nvztsIHwpoz57XTffhb55pjmzp0B62TscikLqkhbjdvwVMrOzont79 CEs6p98LyeKQWzSYs36JcmQw4M/ZSFCzO6qc3/GVPJFs7snAyzgg+rNs0INcqQy1y8sV +DRXtbqanmiaVplUzEHyCPR+85d5LNxyICMcz3CJVrbrdvHjQkanR9uIZeDTZIQHYzyO BcPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@umich.edu header.s=google-2016-06-03 header.b=ceH0ica9; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=umich.edu Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m12si1083299ejr.608.2020.12.09.09.42.59; Wed, 09 Dec 2020 09:43:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@umich.edu header.s=google-2016-06-03 header.b=ceH0ica9; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=umich.edu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732904AbgLIRkV (ORCPT + 99 others); Wed, 9 Dec 2020 12:40:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732900AbgLIRkN (ORCPT ); Wed, 9 Dec 2020 12:40:13 -0500 Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6FCCC0613D6 for ; Wed, 9 Dec 2020 09:39:32 -0800 (PST) Received: by mail-ed1-x543.google.com with SMTP id p22so2463320edu.11 for ; Wed, 09 Dec 2020 09:39:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=umich.edu; s=google-2016-06-03; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sBZzAfNzfOou0B8fifSYJ0Zgmw/sL+t1Bu/8GF9krME=; b=ceH0ica9+uzFYJHMzGxTwxiyyhwt3PqKG/93nw1+WFrptzaOo4soGviZwsWI+3RRb8 FG+IXMFWiSgYqtiAyQmPikIdDizpCseRrjIJ1uRByouGAXASRcdVEKvcROhH7OumMzxI beoqSq5SNmhe7nP1SSN8PsdWI4hHejdqdsfwEnqwAQ8ZYHVS6dRrxnvpY/Sl3raZs08o e5cXhcJLvyCgun0UPcaloJ6jJ+rUhpZjt+KyW9oyPBmqYglcGMn3XKWYpKQS2ULETV2i QI1fJFQiz2HG3UhchNXo8b2bWp+ONafN6pdsOD4kSOvdL6Nf9Uu3LQttUqVFArjSvjAl hdSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sBZzAfNzfOou0B8fifSYJ0Zgmw/sL+t1Bu/8GF9krME=; b=ZlP6Fipnuf385Ps2R4w2J9xq8vKvIADA/yTJXnbtKxpF3t83I5oa23wFXdAZXKfWlu oQCMkwydIg4U7PRcZFlVqqxzUU9WE+w2LX2b6c7R/CkuP00sYuj5NjyPd7kxuTbeJZup 93ymB2N/txPODwDAfVKMCNnXvjWN03N+6BKQITCgYIuRwPW8sti5lnlXe0YRyAwi4z3y LCeHyhM7FSobmfSgopNGkV0/LBuOgFOY92WZMO2N90t1h+oQ+pNdxWSWWOTDt2kIuXRs gNZJmNi54HSyX27O0YoH97g2zGNN7jwMP+VsoOzwNQXXB/ylSaUtZCayvhrk3xO7XGKu X03Q== X-Gm-Message-State: AOAM530tFVIrtxZH27zUhYC4xvb4KzHKkazaIV0PV8KKoFCCnN17pBuL 1+V7nJkncrdT1/kC6a6+d6b30iFNZDrvNMUm8EErF11v X-Received: by 2002:aa7:d886:: with SMTP id u6mr3119710edq.139.1607535571611; Wed, 09 Dec 2020 09:39:31 -0800 (PST) MIME-Version: 1.0 References: <20201203201841.103294-1-Anna.Schumaker@Netapp.com> <852166252.2305208.1607096860375.JavaMail.zimbra@desy.de> <14eac8ec352c76206c811f75b130957bb75ff590.camel@hammerspace.com> In-Reply-To: From: Olga Kornievskaia Date: Wed, 9 Dec 2020 12:39:20 -0500 Message-ID: Subject: Re: [PATCH 0/3] NFS: Disable READ_PLUS by default To: Anna Schumaker Cc: Trond Myklebust , "tigran.mkrtchyan@desy.de" , "linux-nfs@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Wed, Dec 9, 2020 at 12:29 PM Anna Schumaker wrote: > > On Wed, Dec 9, 2020 at 12:22 PM Olga Kornievskaia wrote: > > > > On Wed, Dec 9, 2020 at 12:12 PM Trond Myklebust wrote: > > > > > > On Wed, 2020-12-09 at 12:07 -0500, Olga Kornievskaia wrote: > > > > On Wed, Dec 9, 2020 at 11:59 AM Trond Myklebust > > > > wrote: > > > > > > > > > > On Fri, 2020-12-04 at 15:00 -0500, Olga Kornievskaia wrote: > > > > > > I object to putting the disable patch in, I think we need to fix > > > > > > the > > > > > > problem. > > > > > > > > > > I can't see the problem is fixable in 5.10. There are way too many > > > > > changes required, and we're in the middle of the week of the last - > > > > > rc > > > > > for 5.10. Furthermore, there are no regressions introduced by just > > > > > disabling the functionality, because READ_PLUS has only just been > > > > > merged in this release cycle. > > > > > > > > > > I therefore strongly suggest we just send [PATCH 1/3] NFS: Disable > > > > > READ_PLUS by default and then fix the rest in 5.11. > > > > > > > > Sure, but shouldn't there be more ifdefs inside of the xdr code to > > > > turn it off completely? > > > > > > AFAICT, those functions are not called by anything else, so as long as > > > the READ_PLUS client functionality is disabled, they should be > > > harmless. > > > > Is it benign that in the normal read path sunrpc will be calling a new > > function of xdr_realign_pages()? Non readplus code didn't have it. > > It should be. All I did was pull out some code from xdr_align_pages() > and put it into a new function. `git show --diff-algorithm=histogram` > says this is what I did: Ok sounds good then. I just wanted to double check. > diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c > index 909920fab93b..d93bcad5ba9f 100644 > --- a/net/sunrpc/xdr.c > +++ b/net/sunrpc/xdr.c > @@ -997,10 +997,25 @@ __be32 * xdr_inline_decode(struct xdr_stream > *xdr, size_t nbytes) > } > EXPORT_SYMBOL_GPL(xdr_inline_decode); > > +static void xdr_realign_pages(struct xdr_stream *xdr) > +{ > + struct xdr_buf *buf = xdr->buf; > + struct kvec *iov = buf->head; > + unsigned int cur = xdr_stream_pos(xdr); > + unsigned int copied, offset; > + > + /* Realign pages to current pointer position */ > + if (iov->iov_len > cur) { > + offset = iov->iov_len - cur; > + copied = xdr_shrink_bufhead(buf, offset); > + trace_rpc_xdr_alignment(xdr, offset, copied); > + xdr->nwords = XDR_QUADLEN(buf->len - cur); > + } > +} > + > static unsigned int xdr_align_pages(struct xdr_stream *xdr, unsigned int len) > { > struct xdr_buf *buf = xdr->buf; > - struct kvec *iov; > unsigned int nwords = XDR_QUADLEN(len); > unsigned int cur = xdr_stream_pos(xdr); > unsigned int copied, offset; > @@ -1008,15 +1023,7 @@ static unsigned int xdr_align_pages(struct > xdr_stream *xdr, unsigned int len) > if (xdr->nwords == 0) > return 0; > > - /* Realign pages to current pointer position */ > - iov = buf->head; > - if (iov->iov_len > cur) { > - offset = iov->iov_len - cur; > - copied = xdr_shrink_bufhead(buf, offset); > - trace_rpc_xdr_alignment(xdr, offset, copied); > - xdr->nwords = XDR_QUADLEN(buf->len - cur); > - } > - > + xdr_realign_pages(xdr); > if (nwords > xdr->nwords) { > nwords = xdr->nwords; > len = nwords << 2; > > > > > > > > > > -- > > > Trond Myklebust > > > Linux NFS client maintainer, Hammerspace > > > trond.myklebust@hammerspace.com > > > > > >