Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2133776pxb; Wed, 9 Feb 2022 11:33:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJzz7ReEd2g8FXl8FQqH6xh+bTSMAMs5INpon6+lrsFnEfAUAr9PHaMBjy9qNoh4Ga9f/KC5 X-Received: by 2002:a63:f709:: with SMTP id x9mr3085431pgh.428.1644435207048; Wed, 09 Feb 2022 11:33:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644435207; cv=none; d=google.com; s=arc-20160816; b=uKx6m9fh/JKr8Bi5o55mSJkl5hBzw1AED9UKs57kkQkBLIxf9TGNUS0Tz9Vq6vkZvr eVlmZocnRNHUNz/g4fg60V2FMXdqcucXnpVvo7tH88AS/zedZTNYnk1tkUKRi40p5+Ic wNldauTFiUlqYcXgtlUaXI4nmwft5sLrFd8ZrysU2sjNyK6zLLhU2aLCbxnlLZNfuWLG SR/L5+6Yd37lMHBa6kxJOdPYMaaEfM5aMt7rGLGhk6j9+8ipD5UKXgb7g8OmVk09DcmI +398KWARYIt1zKF4HYACGFwB4WUh7BHvG/9mfBu8wA+veOlLbwn7/Zo6eUh+neck90dp jdzw== 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=A555uo4O2xqHD0KdmLFsVdHpmj/wcjtFSrInO+NkWio=; b=cfd3SNcBPI4Ddyz+g1896nVpOh4eyz802Xk58Ae/+R3RxklOxaLGgmnsUAKnu/+Mdo NKzL7iXAngPzTDJHN1ZGNzQV2B4BIDro/8tdTQzEspcPQgh9aQdpxdPB973OD2avOAP5 D1ctQLvvTjfdtiYe4tkIRxZWYG8SLU13o5ZzReV4qWaKDE0GOTUxBQLEGGII2MJEAKWO I5+Vb7prFxwmh6nV+PdDhW3XtiBFRCEGG1FXzU/bLwpR8dISWYYZRcSXTGep38Il7MTt bU2Z8Q4qaXKe8ZvAinj0UARpvrUPrZZb2aGhJaLJYf96dEt87wY+uMGZE4bf2K/ccGWS /Srw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hyJbV9W4; 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 d5si16860359plr.411.2022.02.09.11.33.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 11:33:27 -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=hyJbV9W4; 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 0D22AC1038CA; Wed, 9 Feb 2022 11:33:16 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240898AbiBISyY (ORCPT + 99 others); Wed, 9 Feb 2022 13:54:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241186AbiBISyI (ORCPT ); Wed, 9 Feb 2022 13:54:08 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C62DC1038D2 for ; Wed, 9 Feb 2022 10:49:41 -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 ams.source.kernel.org (Postfix) with ESMTPS id C9110B82385 for ; Wed, 9 Feb 2022 18:49:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3FCC8C340F1 for ; Wed, 9 Feb 2022 18:49:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1644432578; bh=l1cJW970K7Bm+hlEhwk5/9VkO6UwIAWTDsCdKUxx6pM=; h=From:To:Subject:Date:From; b=hyJbV9W4/Fom5je4G11Bxdi6An40AESsIwbgGulIN0OwT62VusWa5gCKzhM+b0++i xj+jU6WPTpMrz9bU3QK+x5rpi9r9/TMI2tA6Y0865xycCGOBAQQ3X7nS+taiLD3glV 5HlR0OPubBoRsZ3XjqmXg3xVujxJcCCB4Vx4KtWYFB8zDswwDKkYXPFllrx13+qGVv CT/DBav1dO3iC9CUBG71Rv9dODFmTwhfef8lTGlgeTratfu6BaCrIv9DH+i5KdVml9 SAYjCszy3ook98IAUesVZxRWk5TAAydMs5k+JLHyfPYuxleM/hh3pxGnIaTCtc2UAd ssA+Q3CW5SB2w== From: trondmy@kernel.org To: linux-nfs@vger.kernel.org Subject: [PATCH v3 0/2] Adaptive readdir readahead Date: Wed, 9 Feb 2022 13:42:49 -0500 Message-Id: <20220209184251.23909-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=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,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. -- v2: Remove reset of dtsize when NFS_INO_FORCE_READDIR is set v3: Avoid excessive window shrinking in uncached_readdir case Trond Myklebust (2): NFS: Adjust the amount of readahead performed by NFS readdir NFS: Simplify nfs_readdir_xdr_to_array() fs/nfs/dir.c | 82 ++++++++++++++++++++++++++++++++---------- include/linux/nfs_fs.h | 1 + 2 files changed, 65 insertions(+), 18 deletions(-) -- 2.34.1