Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp4302199pxb; Mon, 21 Feb 2022 17:23:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJx2rmH4/LlbiH2z029db1B4cPemSS5KPfhxE1cb2yE35Nq9lnXYP4wGO8swGI3HRjl3v1W5 X-Received: by 2002:a17:902:f546:b0:14f:7b6a:e02a with SMTP id h6-20020a170902f54600b0014f7b6ae02amr15678334plf.9.1645493031809; Mon, 21 Feb 2022 17:23:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645493031; cv=none; d=google.com; s=arc-20160816; b=KBqtfcmHitsRu6c1Q7RRkU+OA43ig4N4Z+XUOHFtbCpd4Nv280olgu37EQDAkNMPDL ZCwWlGZi9h0NoTi5hnS7u6KFReAzr/UZuwkZYUiA+GIVgkmrNJtBo4L3+/NpTn+BOrjM SPCk+oa5pka1EPY4KsVgJR9mvQa/kjN0qMYTEEU/1lCV7ltArgp+XjP/SwozdnfivuQA XBxv//WoYv5Tx4WL+Km/cV4Du1DpvvsN3W/XlwoCYHGwvMOAmKvCaAF1wNjXrftRXfuq kVV2L0/Nd6EQYhw2rd3tw//tRJkyYhQJjUM2FrOtulH08ycx3z8gs2c72hmjg4FlSbXA d5FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=/RQO74vB3UwLMGxug9BwsiCUbRYSD1LKvRiVzNi16h8=; b=qyxmQz9NGBJ6A7ED+blSFCiyupKjW3S5vuInhsEqabvzVZ6pcnTZMj/SPXUSewnHYF SuAuoR3gyS3zyvZJHd5oCAP2jNHsuge5D5EFvwhjsZMQkt2nfDy8hZ8gX0rVZejVenEz 8NGb9l+9zfH0ldsmzbP6J2Efy+itHyl9elZbNItKIQCPUWnPfKhh84YYOPUd5Kq2Dunr KpR2ryZNa9Zw48zAhsRwa9In+iwi1/pNWrXEjrhzVp6sIE02mHZZaUA6/0noIvJtrs8E IIS3Xilo6NrlzV/gu3PO3iYegcb10s1IB3tRUPpT3JBiNdQB6m3Hd7ZbH31v27S1hQFv 7/dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WE45UURO; 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 c194si7643506pfc.292.2022.02.21.17.23.36; Mon, 21 Feb 2022 17:23:51 -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=WE45UURO; 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 S1354941AbiBUQpe (ORCPT + 99 others); Mon, 21 Feb 2022 11:45:34 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:59674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1381038AbiBUQpd (ORCPT ); Mon, 21 Feb 2022 11:45:33 -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 024FA22BD5 for ; Mon, 21 Feb 2022 08:45:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645461909; 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=/RQO74vB3UwLMGxug9BwsiCUbRYSD1LKvRiVzNi16h8=; b=WE45UUROjvJ7DRWa2BzgDiU05C5lbqSk2WS+0FyyKu9rJ1nLcJsBsSOuxSQ3OHxhjprQox /oGNjGNG55gP0Kw3FJ1BmytaHtKc6Qu5bd85mUyyWTroQWzAOwHDNenNQk8QQvakgn+xfE uCfG2a8LMyDh1wJ/9IBwqwTPn+V9eN4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-237-tECtSaesM1uq4lR2kvCdSg-1; Mon, 21 Feb 2022 11:45:07 -0500 X-MC-Unique: tECtSaesM1uq4lR2kvCdSg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B00671006AA6; Mon, 21 Feb 2022 16:45:06 +0000 (UTC) Received: from [172.16.176.1] (ovpn-64-2.rdu2.redhat.com [10.10.64.2]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6D7D8838F4; Mon, 21 Feb 2022 16:45:06 +0000 (UTC) From: "Benjamin Coddington" To: trondmy@kernel.org Cc: linux-nfs@vger.kernel.org Subject: Re: [PATCH v6 05/13] NFS: Improve algorithm for falling back to uncached readdir Date: Mon, 21 Feb 2022 11:45:05 -0500 Message-ID: In-Reply-To: <20220221160851.15508-6-trondmy@kernel.org> References: <20220221160851.15508-1-trondmy@kernel.org> <20220221160851.15508-2-trondmy@kernel.org> <20220221160851.15508-3-trondmy@kernel.org> <20220221160851.15508-4-trondmy@kernel.org> <20220221160851.15508-5-trondmy@kernel.org> <20220221160851.15508-6-trondmy@kernel.org> MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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, 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 21 Feb 2022, at 11:08, trondmy@kernel.org wrote: > From: Trond Myklebust > > When reading a very large directory, we want to try to keep the page > cache up to date if doing so is inexpensive. Right now, we will try to > refill the page cache if it is non-empty, irrespective of whether or not > doing so is going to take a long time. > > Replace that algorithm with something that looks at how many times we've > refilled the page cache without seeing a cache hit. Hi Trond, I've been following your work here - thanks for it. I'm wondering if there might be a regression on this patch for the case where two or more directory readers are part way through a large directory when the pagecache is truncated. If I'm reading this correctly, those readers will stop caching after 5 fills and finish the remainder of their directory reads in the uncached mode. Isn't there an OP amplification per reader in this case? Ben