Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3263031iob; Mon, 16 May 2022 17:30:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyiRuACAHdVPpBSOkd/H+8y33pudAv3xig+sXJJarBNlowmouRsBQsZG7+AMWTYLX6QBkhu X-Received: by 2002:a63:6a82:0:b0:3bc:321e:6d54 with SMTP id f124-20020a636a82000000b003bc321e6d54mr17637554pgc.232.1652747447897; Mon, 16 May 2022 17:30:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652747447; cv=none; d=google.com; s=arc-20160816; b=yxUC/iX6Be9X+UYdic8zfI7KpkJ/F0zsMhMo84YalWtch4hauBNFpta1hriv/idKZB tB/MbbNy9CqTqK33WxMCP6GVAMcZFALxdG46QSuym4upv2IEX1GU+Lkg+RJi1GroCpfR yWWz2sagz91AegMVdP+8PgEXOyltnBybptU8SKv2OeV6Z08AwoSQr94mfbYbMRZR95N/ o8AA2IqxJnzai1uT5Zb7WdNQ/nht5lFBuI2k0TgJnlm7UwT05Rm2gL4Ncd8kKkPFSspp UuzAk51iYD5kak+BW7Rtx6U280gyksAJ2j8YcnTjOUCypErfNSCvhhBCI+oTn79ZdTHy mRpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Kj2o5/0Y5wn7/xeomPuDm9nx7LvJ7zylnvj37BHJVfQ=; b=OYHuzJsIlfNUUFneHziOw0rnTn69U6PNhroCb2dWwLHaI1Xc5l0m1KrjBcrrZrprfE I2n267C5s/kAO15lFe9nHAtf1SIEYlKvYnDW2LaFC48Mz88zpReGcaOUJawCcZIPP/hv WPRvr8ab2v2nA9D7xjc2R+I6ps36UrlXbytuAX1EUKDsU3HAYn48a5e5HnSFd5pRJmh8 SsDW2UlGSqvOpVh9I+j1EQRJHJzvgllvfs20QwttRvd0GwP4U94IxffoJK0c36rklAyl dx6k0GR76OpHVeHA3O8L/pdV3om2lISP9aM7aSQJa0DCbjxHinLfzmmhUYQiFOEghqhn UAWQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=netapp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o12-20020a656a4c000000b0039cef73106esi10190846pgu.511.2022.05.16.17.30.24; Mon, 16 May 2022 17:30:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=netapp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345903AbiEPVB7 (ORCPT + 99 others); Mon, 16 May 2022 17:01:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348926AbiEPVA7 (ORCPT ); Mon, 16 May 2022 17:00:59 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6D71F3B for ; Mon, 16 May 2022 13:35:53 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 35C01B8165B for ; Mon, 16 May 2022 20:35:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9E2E0C385AA; Mon, 16 May 2022 20:35:50 +0000 (UTC) From: Anna.Schumaker@Netapp.com To: steved@redhat.com, linux-nfs@vger.kernel.org Cc: Anna.Schumaker@Netapp.com Subject: [PATCH v1 0/6] NFSD: Improvements for the NFSv4.2 READ_PLUS operation Date: Mon, 16 May 2022 16:35:43 -0400 Message-Id: <20220516203549.2605575-1-Anna.Schumaker@Netapp.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Anna Schumaker The main motivation for this patchset is fixing generic/091 and generic/263 with READ_PLUS. These tests appear to be failing due to files getting modified in the middle of reply encoding. Attempts to lock the file for the entire encode result in a deadlock, since llseek() and read() both need the file lock. The solution is to read everything from disk at once, and then check if each buffer page is all zeroes or not. As a bonus, this lets us support READ_PLUS hole segments on filesystems that don't track sparse files. Additionally, this also solves the performance issues I hit when testing using btrfs on a virtual machine. I created a wiki page with the results of my performance testing here: https://wiki.linux-nfs.org/wiki/index.php/Read_Plus_May_2022 These should probably have some soak time in linux-next, so let's target them for the Linux 5.20 (6.0?) merge window rather than rushing to get them into 5.19. As far as ordering goes, these patches should probably go in before the related client changes as the client will also be changed to make use of the xdr_stream_move_segment() function. Thoughts? Anna Anna Schumaker (6): SUNRPC: Introduce xdr_stream_move_segment() SUNRPC: Introduce xdr_encode_double() SUNRPC: Introduce xdr_buf_trim_head() SUNRPC: Introduce xdr_buf_nth_page_address() SUNRPC: Export xdr_buf_pagecount() NFSD: Repeal and replace the READ_PLUS implementation fs/nfsd/nfs4xdr.c | 202 +++++++++++++++++++------------------ include/linux/sunrpc/xdr.h | 6 ++ net/sunrpc/xdr.c | 102 +++++++++++++++++++ 3 files changed, 210 insertions(+), 100 deletions(-) -- 2.36.1