Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp817421imi; Thu, 21 Jul 2022 11:32:58 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tEj8tSsca8P49HQ8zTpFyA5w5sVBY3aRn1gCVaITo3eksp4QemXrXd/SFgGsaom93NlAF4 X-Received: by 2002:a17:907:d92:b0:72e:e968:7fa1 with SMTP id go18-20020a1709070d9200b0072ee9687fa1mr33259131ejc.731.1658428378619; Thu, 21 Jul 2022 11:32:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658428378; cv=none; d=google.com; s=arc-20160816; b=kpVfl8tV1IrHTzcuYieNJjwVQsI7XbrF4xY0ZDKlYCQPSwzLJVs+JMoLgAOpapl2Po MzL5IhvvwRIqKi1vNW8QNqAwT9CekPzuy+JT8FJE4Qfc4SYyJjz5+3vkLeKYbzdP9xNm BJflRP5CySVZKy3Bdu20Wc9n5znfL92nm94njr3kQo7ZcJBrXW57XjD8+rGHcHzur7rU FgppC6GqqSpnQihTwkSI74fs6dClVyo/cMT7zyqA2pvqjEknLU/GiXlQeN35FIpRR4I8 5ewB+JN+JtoXjcUqpFM5WEDcw2YhqWKLI+BBadN6bEpoIz8Cw+Cbsb8waDCDZSY5SboN T1Gw== 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:dkim-signature; bh=Tm03I2u46fgEzpZxLw9OlI2olxBbxdHedC3mGBnco0w=; b=zA/PFzbCnN3JUodohR0gC/Ot1D5s1j8UmdlbHlgA0dOPzwoKv67h4Zqgrr0v7d4PId ajMM2febGELdJ2cHwYW9VQzfdvDzZxX125ydPwd/R/AcN+14q0bNa9Kr7nzWnN2nNPrs 2eXMOGFgMaVgKxBTlTWueqRUO2fjlIJ5MVkBnOep1swq0X5mi675cjWaMNECr9SKA8ut WgvFW+DXU4IkC1MJSJ+i6sg+rqwOBlIttyM6HA3Bdx8q1gHK9YaZDuDhXuNGYj47iHCl J22yDk3re0A2CKlDLT/7DwneUWilJyDHiWo7VNV5Sax8BVfwZDikGg2Ip2ogo/OZ6F1h S5zQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="FXDfM/UI"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sg12-20020a170907a40c00b00718d0604af4si4028827ejc.604.2022.07.21.11.32.33; Thu, 21 Jul 2022 11:32:58 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="FXDfM/UI"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229613AbiGUSVj (ORCPT + 99 others); Thu, 21 Jul 2022 14:21:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231642AbiGUSVi (ORCPT ); Thu, 21 Jul 2022 14:21:38 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 631B718E0A for ; Thu, 21 Jul 2022 11:21:38 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 0099461FC8 for ; Thu, 21 Jul 2022 18:21:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F3584C3411E; Thu, 21 Jul 2022 18:21:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658427697; bh=+qj5QPfcjYuIzi9dZPA/RKRcJf05OxdoHANRyel2Fog=; h=From:To:Cc:Subject:Date:From; b=FXDfM/UI7p1kcYCC7ORtgz4rpOxC94efNA1R09Hf39QAT4x95MqoS45/NDoNcdVUW w+3Dk1R4YLUJZWL+9645A3rTJYZn5erYBwKmKP4XhTvBZ80YL0uTX5uRDJuKCmsfIp Q7Fr4jPWdln1lH4+NR1rVAOU1BoKEKOts5AMKoQ2GYf9IRR8xnP1N2pNnFP/vLc5jV rBiPikGi+Z3opPxqXtSWxKWLErhGj7joFjz9C5tmvK/UNJLZyWWpwnhe+Y1My074+R 8GK7sxG/pjk2rx6VrEZl+plKFPuVVO2nGpSQ/GQkjMTvbYSfD6VMhCLWXV6SpERAMl +G+2WHlEgGN9w== From: Anna Schumaker To: linux-nfs@vger.kernel.org, trond.myklebust@hammerspace.com Cc: anna@kernel.org Subject: [PATCH v3 0/5] NFS: Improvements for the NFSv4.2 READ_PLUS operation Date: Thu, 21 Jul 2022 14:21:30 -0400 Message-Id: <20220721182135.1885071-1-anna@kernel.org> X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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. Changes in V3: - Move the "Introduce xdr_stream_move_subsegment()" patch into this series so it can be applied now while work on the server side continues. - Drop the patch removing the Kconfig option at Trond's suggestion. Thoughts? Anna Anna Schumaker (5): SUNRPC: Introduce xdr_stream_move_subsegment() 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() fs/nfs/nfs42xdr.c | 168 ++++++++++++++++++------------------ include/linux/sunrpc/xdr.h | 7 +- net/sunrpc/xdr.c | 170 +++++++++++++++++++++++-------------- 3 files changed, 200 insertions(+), 145 deletions(-) -- 2.37.1