Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3161435iob; Mon, 16 May 2022 14:45:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzGytEXbvxx40lyGF++uI3XcgkUjFnn00YHmSbfpyfl7wCOPdrmgzHOtNYM4Xv1y+KEoGJp X-Received: by 2002:a05:6402:430f:b0:427:d034:295b with SMTP id m15-20020a056402430f00b00427d034295bmr15401395edc.126.1652737515798; Mon, 16 May 2022 14:45:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652737515; cv=none; d=google.com; s=arc-20160816; b=J1VJ/lnDy4qwmxgPg2+EaD/vraW0kpJHHSSow3oxWNiIlSgCw/qNBqGacw2lYWusys AFgExHPbc7Y+E41TsTprLVDG8igIwRQ1z3bVy+1ulUInqnJcmXAM1RYvnTs/FeJ6ber3 Zwh7ZM8eEz2b9MkjndAy15kqfslLdZKsquW7Y/2uyOEfHUSzOItBNJv8EXAwAP43nF/x EaZGqqnlAXsNLoS/VSggKY/mLy9FawibvxmNlE+xbIDdrL8MaM+qkHGlwdoMl1qF0HYE HBAF4Iw1FQZyt3BaP7hOnGx7sKrllX055V48VSjhVWHR23fTRwIlLQatkx3VMKUR0lo2 mZuQ== 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=wqrYBxSOJ0eb+HM25Sxtz9v2DWt5WkGZr5TeGWS3U4c=; b=i1CdaKHPxqkhzXvAFbZMQfm/DKA4wluqU/MaVsbhCmveIokvW6slZnVAuqEH+gMy3i G8cPxFIDkbiIP7URMUcjzg4E/v8DsgI3gDsNcuQWDuUJigJJS8QeKpFGc3zVDvi/npl4 VC88qxtydGs1EAeONbAVFsafud69/g5mZ2Ig4K1w0Klh+4+kXipIw9fmm1f0iNL6Ixzx Td+UWtZKczrnwHI4axnWN+MiecT4BJ6tjoyny/sTjFYhmu1JfmPx3LhMieJxxaXOXDtO rpfU8vbOCHq7bHGw3K7mmk9xy2p3RKrftlU2RxuY7KGyhVRj+4jkK0rzLUbHxb6K1gMO tVyw== 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 eq20-20020a056402299400b0042aaaf6b22bsi4875690edb.494.2022.05.16.14.44.35; Mon, 16 May 2022 14:45:15 -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 S1348876AbiEPVBo (ORCPT + 99 others); Mon, 16 May 2022 17:01:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349213AbiEPVBI (ORCPT ); Mon, 16 May 2022 17:01:08 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3068AB859 for ; Mon, 16 May 2022 13:36:26 -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 C9144B815F3 for ; Mon, 16 May 2022 20:36:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F190C385AA; Mon, 16 May 2022 20:36:23 +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/5] NFS: Improvements for the NFSv4.2 READ_PLUS Date: Mon, 16 May 2022 16:36:17 -0400 Message-Id: <20220516203622.2605713-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 Previously, decoding was a one step process that expanded holes as they were seen in the buffer. This had a few undesireable side effects: 1) An extra READ_PLUS call was often needed to fetch any data shifted off the end of the buffer when the last two segments are a HOLE followed by DATA 2) We shifted the entire remaining buffer for each hole, meaning some segments would get moved multiple times during one decode pass. These patches attempt to address this by turning READ_PLUS decoding into a two-step process. First, we build up a list of each segment returned by the server, then we walk the list in reverse and move each segment directly to their target offset. This cuts out all the extra copying, and means we won't lose any data off of the end of the reply. The results of my performance testing can be found here: https://wiki.linux-nfs.org/wiki/index.php/Read_Plus_May_2022 Between these patches and the corresponding server patches, I'm seeing a several second decrease in the amount of time that a READ_PLUS call takes to complete even on the worst case test where pages alternate between hole and data segments. I also optimistically remove the CONFIG_NFS_V4_2_READ_PLUS Kconfig option now that the known performance and correctness issues have been resolved, but I would also be fine with changing it to default to 'y' if there are objections to entirely dropping the option. Please note that these patches rely on the xdr_stream_move_segment() function added as the first patch of the corresponding server patches. Thoughts? Anna Anna Schumaker (5): SUNRPC: Add a function for directly setting the xdr page len SUNRPC: Add a function for zeroing out a portion of an xdr_stream NFS: Replace the READ_PLUS decoding code SUNRPC: Remove xdr_align_data() and xdr_expand_hole() NFS: Remove the CONFIG_NFS_V4_2_READ_PLUS Kconfig option fs/nfs/Kconfig | 9 -- fs/nfs/nfs42xdr.c | 168 +++++++++++++++++++------------------ fs/nfs/nfs4proc.c | 2 +- include/linux/sunrpc/xdr.h | 5 +- net/sunrpc/xdr.c | 111 +++++++++++------------- 5 files changed, 140 insertions(+), 155 deletions(-) -- 2.36.1