Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1670455pxm; Thu, 24 Feb 2022 07:20:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJxe1ANG5g2i5027Kmbb2emXVNHUqo1twiknDMRoJfdYhLS2WILfrnV9lxHYfzYYUXXuFIFa X-Received: by 2002:a63:e241:0:b0:375:9f87:eb1f with SMTP id y1-20020a63e241000000b003759f87eb1fmr1010722pgj.216.1645716026295; Thu, 24 Feb 2022 07:20:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645716026; cv=none; d=google.com; s=arc-20160816; b=US0msqBhY9wcyDjk3GqyVfiBMn1/4gvoLI79uOdT0c8VcP+uBFtZdUzCvSRim2iEFz JPmFZufeQR5a0TgdKdZp9QOqxfZWXsciRNuCoMB3gQJ8OvgkGrQCUssSkMnUAC2JK5HM 1NaxVivr/FCmOvyJhSqkQogfXAOgohInLAaGNmHyFpyVApdhGnMDgCSDBOoqxlWqBT2a XyRD6lcqWZcq5eV3+8qJYcMOwm9OSf228Ex/k4SVEfjlKqVrUdne4X7k4L091apt5vRl U8OoYME8wSQ0wP4+uf3D0MdlZY4lmeNS9w7v0CA0fec1t+9HknDc+c1DjZ2I3i+tx0f5 LLQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=zW8MpZRIcYdegour5AdeFQYVjH6vtNmq9KFcn/WZe70=; b=g8hw8Xy4K6RQSZXNOCiMtjWfiyHosE2NBVCqjocr/aWh+m+cOZtCA4EGjBWfbbEt1u eJbLRp26eYNnpHreks9+GcfFqkfImBoMfMGMkdb669v1rDOEsfjwKslAlPf12Oft4Koj 4vNtJaAGGNxp4wiB2q/4ygNKN7lGmmm2mytFTxL/LnTGauSUXiwdmlTNcoNF5gE80H6y MKUaZRWSvdBzJXr9gkwv17NExeuXO2S7K4UQ05LtwibT57kmYfBQ4Lg7gnOxOlS03MdL phbDI4JpwaKSe9J0kc/hjeCBsxJ0rkX7/WKNeZKMpvYEM6dA98oPaTIabpnzI47zXxgK Q2ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=N+pDUYgd; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t21si2507216pjr.32.2022.02.24.07.20.05; Thu, 24 Feb 2022 07:20:26 -0800 (PST) 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=@redhat.com header.s=mimecast20190719 header.b=N+pDUYgd; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233452AbiBXPI3 (ORCPT + 99 others); Thu, 24 Feb 2022 10:08:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231623AbiBXPI2 (ORCPT ); Thu, 24 Feb 2022 10:08:28 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6E94042A2F for ; Thu, 24 Feb 2022 07:07:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645715277; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=zW8MpZRIcYdegour5AdeFQYVjH6vtNmq9KFcn/WZe70=; b=N+pDUYgdSCx9BCD+AfKkWiri1+k5L0HiwXbJqEe8ftQaByuh3zcAdYQdN/1/v9zEUlovCV nKeQ40c+57PYVfMcvWUzBZiqk3a10YD7MwoFRmh16419ehkLZ9g/rG3MHjvOkM1MmaOXs5 x/fndCvuue8xWV0tPZxOJypKTz7ShUk= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-641-3243B_PZPu6tNAgCbiB9uA-1; Thu, 24 Feb 2022 10:07:56 -0500 X-MC-Unique: 3243B_PZPu6tNAgCbiB9uA-1 Received: by mail-ej1-f70.google.com with SMTP id m12-20020a1709062acc00b006cfc98179e2so1351843eje.6 for ; Thu, 24 Feb 2022 07:07:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zW8MpZRIcYdegour5AdeFQYVjH6vtNmq9KFcn/WZe70=; b=P/mkBsQY0Z09DIfwr0NrVeKWz9sabcGABRlvgPEvZ1VasJHClHAOQ73KgG4dT/QWa5 ixxNOo7zWN2n92R7bMjnMgMzFTcPtfDgZC4cwRJfi93ScB9oWmpo4QdBgffYqDZVZe/l SbzwjNLuXLsHKgq13z8OPciue8r6aMyBjERDCI+0NpWwiGN/iGAhZdJbJfcHG+bzFigD f1+7ZqRMI//MJ5a5LkP98R1Kb0qTvvS5e7McysYRVKQvkr5aF1Xa1zikABSUQ+/rnvKu BSPTMFsd67SOMH2/r67Qx39k8Urjn5TVfYbR2p0EpFxJkclc10HH36WiM8PDPFFPrOUd P4qg== X-Gm-Message-State: AOAM532RyIRBKb32sFwdwrkMYZ1QFSiSZO7QYbUy2c0Cz4RdNhjs61Wi EPzGLXXlLsEGZLbx5mnhYB18aDU5tvXDuAR2qKXollbLdkaxx+55aR49gl2AlLN/kcreheMH5Qk U6GjhRSO5Qxl9re8R1pHmcpe6/wIMakH37HTR X-Received: by 2002:aa7:c982:0:b0:406:3862:a717 with SMTP id c2-20020aa7c982000000b004063862a717mr2742175edt.358.1645715274471; Thu, 24 Feb 2022 07:07:54 -0800 (PST) X-Received: by 2002:aa7:c982:0:b0:406:3862:a717 with SMTP id c2-20020aa7c982000000b004063862a717mr2742152edt.358.1645715274269; Thu, 24 Feb 2022 07:07:54 -0800 (PST) MIME-Version: 1.0 References: <20220223211305.296816-1-trondmy@kernel.org> In-Reply-To: <20220223211305.296816-1-trondmy@kernel.org> From: David Wysochanski Date: Thu, 24 Feb 2022 10:07:18 -0500 Message-ID: Subject: Re: [PATCH v7 00/21] Readdir improvements To: trondmy@kernel.org Cc: linux-nfs Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, 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 On Wed, Feb 23, 2022 at 4:24 PM wrote: > > 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. > > This series also implement Ben's page cache filter to ensure that we can > improve the ability to share cached data between processes that are > reading the same directory at the same time, and to avoid live-locks > when the directory is simultaneously changing. > > -- > v2: Remove reset of dtsize when NFS_INO_FORCE_READDIR is set > v3: Avoid excessive window shrinking in uncached_readdir case > v4: Track 'ls -l' cache hit/miss statistics > Improved algorithm for falling back to uncached readdir > Skip readdirplus when files are being written to > v5: bugfixes > Skip readdirplus when the acdirmax/acregmax values are low > Request a full XDR buffer when doing READDIRPLUS > v6: Add tracing > Don't have lookup request readdirplus when it won't help > v7: Implement Ben's page cache filter > Reduce the use of uncached readdir > Change indexing of the page cache to improve seekdir() performance. > > Trond Myklebust (21): > NFS: constify nfs_server_capable() and nfs_have_writebacks() > NFS: Trace lookup revalidation failure > NFS: Use kzalloc() to avoid initialising the nfs_open_dir_context > NFS: Calculate page offsets algorithmically > NFS: Store the change attribute in the directory page cache > NFS: If the cookie verifier changes, we must invalidate the page cache > NFS: Don't re-read the entire page cache to find the next cookie > NFS: Adjust the amount of readahead performed by NFS readdir > NFS: Simplify nfs_readdir_xdr_to_array() > NFS: Reduce use of uncached readdir > NFS: Improve heuristic for readdirplus > NFS: Don't ask for readdirplus unless it can help nfs_getattr() > NFSv4: Ask for a full XDR buffer of readdir goodness > NFS: Readdirplus can't help lookup for case insensitive filesystems > NFS: Don't request readdirplus when revalidation was forced > NFS: Add basic readdir tracing > NFS: Trace effects of readdirplus on the dcache > NFS: Trace effects of the readdirplus heuristic > NFS: Convert readdir page cache to use a cookie based index > NFS: Fix up forced readdirplus > NFS: Remove unnecessary cache invalidations for directories > > fs/nfs/dir.c | 450 ++++++++++++++++++++++++----------------- > fs/nfs/inode.c | 46 ++--- > fs/nfs/internal.h | 4 +- > fs/nfs/nfs3xdr.c | 7 +- > fs/nfs/nfs4proc.c | 2 - > fs/nfs/nfs4xdr.c | 6 +- > fs/nfs/nfstrace.h | 122 ++++++++++- > include/linux/nfs_fs.h | 19 +- > 8 files changed, 421 insertions(+), 235 deletions(-) > > -- > 2.35.1 > I don't see this pushed this to your 'testing' branch, but I applied manually after resetting at 3f58e709c162