Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1561049pxb; Tue, 8 Feb 2022 22:20:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJwvJxflfNnHIwc3Ggy9LdnM3wYjPyXO3cv/3zGmG6tJuSiQ3A2K6RqsnsfjSBuatbrPNo6a X-Received: by 2002:a17:90a:65c7:: with SMTP id i7mr1751998pjs.116.1644387646387; Tue, 08 Feb 2022 22:20:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644387646; cv=none; d=google.com; s=arc-20160816; b=CPst7SASLN4O74YNRjsnrKakV8XlCIsOtg0CcfS7zCiDZU14zMY2QqT/dR/VUEA8iE Wzm7Wy3PCwDOjzKaWGwIidPR32rlN9uSGWVrJB/gvWMx77pv6XYPSfb9GiH1njk9oBno 3o06TSbWhB7Mu3ktnNeU34H3y4lycZ1yUZfnW7pNzTff5N7zBOCw9xnN0rymWfclHKGo R5BQ5oDwydI5bgWHmZuERhUbkRUcTgZxONXvvTlpw4D44s8wNp8laUrgEOZqQbPc7uqv yeJmFR1t//TUPPVRNzDORb4h1UJGaIVsxG8QTf/HepryqmNBuw+SrUhq414XUeBgVORE bluw== 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:to:from:dkim-signature; bh=qzgwGXT7b1ntOQjVjAVNpQ1HSaE4bOqtJ0p+obQMbqA=; b=TIJzPY7Yp/wKq1aWSwCNCOaN0I8WD4TXU1JbOuS/ttFNTCeYxkPhy4gBfum5bAYO9y TWTDf2H1W/dN3rrt0X+b2NrBykUDPZRVEUnc+mDsOzk0+WP/AkXyef1wbLNLeEsgcydc TufZS850Ka14tsOGNrZjfM1ZJkcx08t4rxQSNOssF7AT+LXAWN68mdapv3gQjAJjI+cW zUU5zZYKaJPrZbFgwY5ETd7CtmHsAqsAAbNOf6Cd5pd5ZwlWaDJ5Di1vpKeqW7rhdKlb G0hQPI7rcP3ZNNlfNMs3gGhlSJlZaBO0AN94/66jcgdkhnANRQRG28PQlwLFx97/2T68 k50A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Pl3oaoYZ; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id rj13si4446337pjb.89.2022.02.08.22.20.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Feb 2022 22:20:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Pl3oaoYZ; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4E13DC0302DF; Tue, 8 Feb 2022 22:00:43 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242781AbiBGVwW (ORCPT + 99 others); Mon, 7 Feb 2022 16:52:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239071AbiBGVwV (ORCPT ); Mon, 7 Feb 2022 16:52:21 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9B2AC061355 for ; Mon, 7 Feb 2022 13:52:20 -0800 (PST) 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 sin.source.kernel.org (Postfix) with ESMTPS id 15BD0CE12F2 for ; Mon, 7 Feb 2022 21:52:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4756BC004E1 for ; Mon, 7 Feb 2022 21:52:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1644270737; bh=LNDtppmrla3a5y+kPk3soXpBrb9OUCpzpKKpUEiTfnA=; h=From:To:Subject:Date:From; b=Pl3oaoYZIQifXVFx0kCF/9GqRMAs7xnQ6LAlw/UGqt0fUe+fMA8+w3i4dP/PX4mTk 0XU+YGjThCKV+Cjq1/Xw4QDLXpsb3Fh3H4nc6ze+igTCOtypKLdvHruWLnF96ZDrJC tSCckyVzYF17MnTQK7tSPgXTmLwn1Bc/6y+Xel0pdUTsAccbjtzzg8ouKsRhB4GVGP xJT2aVsbXnjgG7iKxZ/L0lnvv8F3IZZ0wogqSA2ZBJjVXsnZ9t8b/eG10ctH0us6Ot 0NeKIqDcQsNKGGB0laOFNvGhjxKxzOnlijmmXMITj+pKA/hOgmE9uJdOPLqBwNZLbw v7r0IyTHVV5nw== From: trondmy@kernel.org To: linux-nfs@vger.kernel.org Subject: [PATCH 0/2] Adaptive readdir readahead Date: Mon, 7 Feb 2022 16:46:08 -0500 Message-Id: <20220207214610.803566-1-trondmy@kernel.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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: Trond Myklebust The current NFS readdir code will always try to maximise the amount of readahead it performs on the assumption that we can cache anything that isn't immediately read by the process. There are several cases where this assumption breaks down, including when the 'ls -l' heuristic kicks in to try to force use of readdirplus as a batch replacement for lookup/getattr. Trond Myklebust (2): NFS: Adjust the amount of readahead performed by NFS readdir NFS: Simplify nfs_readdir_xdr_to_array() fs/nfs/dir.c | 91 ++++++++++++++++++++++++++++++++---------- include/linux/nfs_fs.h | 1 + 2 files changed, 71 insertions(+), 21 deletions(-) -- 2.34.1