Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp581427pxb; Thu, 12 Nov 2020 10:51:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJxhfaISHgRMhIxbrZFA/vtqYpnPi/eXqyEsbE6eVSwWXUwaocQgojj9xWY2i81ee18T8iLQ X-Received: by 2002:a17:906:3899:: with SMTP id q25mr771175ejd.0.1605207092460; Thu, 12 Nov 2020 10:51:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605207092; cv=none; d=google.com; s=arc-20160816; b=Nhye68GsTXv9OZ9WaPI4uTJbXborUgnWmxEkSOftj4Z5QNbx1x0iZtS7SYB4O+SITp 0wIZWjjmlh+qU88Ya6EVqugnvpHAwZOB6B1g9avaVgFEhYCKG6Bq12tCvWUmxIkDUW6Y RbLSfzkrTpkGH17eN23vfUaHxvcZVP34dX9SEL5cqls4Apees12GRVKFB5zlG2f8eDfP ZEvC6B6w4IMQCEl/mKWCpFBj1ifJCtUHRSFMvk/MSkDRLMlEwjE0Z63j8cmutaCGlA3/ ABRqKXvQ55+8nzx2FcX5F1SHrydX30C1yjHw8tTmkE8IH0CoJHDoe92KR9tkt6F786SN ABeQ== 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=Piy9oCyWLCdrorFM3vAr9DelvURLZLtK/4bHxYKoyvo=; b=NwIg3GjeyPV3SiPgwe8U5poYbrvhqROmBrgBaI9zRTxKv1rJFAnq/ikftnDbxDd5uI tP6Ra+cSfzPShske5znJIOpy9dbtpLmzcovfc4ffXgre96MQv0epWydPqxEwDy7+3aUc EIKDOupixxcddbAipG2wmD+qTcHrjY7xLj3iIjR7or7dApFFWpOzDsux9wMryNq19CMS t2vHwbfbItK0161w/wOuNxl4VYLetlev2Qerv+DLQB0kS4hjK/Ib+0JDIATvTnL8mO9B LNKzutLXz+5IaQarF1JuSey1x/5w1M9+Cua6ANb2ZM+KWCdQ/psa42WKTvWBLEKGBnd1 4ZtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YjS3feE5; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lx16si4109201ejb.379.2020.11.12.10.51.01; Thu, 12 Nov 2020 10:51:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YjS3feE5; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 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 S1726310AbgKLStY (ORCPT + 99 others); Thu, 12 Nov 2020 13:49:24 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:38915 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726148AbgKLStW (ORCPT ); Thu, 12 Nov 2020 13:49:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605206960; 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=Piy9oCyWLCdrorFM3vAr9DelvURLZLtK/4bHxYKoyvo=; b=YjS3feE52xSbLh2AcQ8PXACEnMsz0UCd6EOQlet0lZCK33rkqu2inGboPPBeP90B5IjXqE tLdewPTZPsaMhlhoQwFcChI0lPJGc+o3U/wKgoHreZAD2EQB3sovhpjzd5tjwkqms2REip qxzWe6FW364MKVmkeU5sAs6OulU4VSE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-283-cczNtFBiNQ2Te0ekYsbK6g-1; Thu, 12 Nov 2020 13:49:18 -0500 X-MC-Unique: cczNtFBiNQ2Te0ekYsbK6g-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A2F601008548; Thu, 12 Nov 2020 18:49:17 +0000 (UTC) Received: from [172.16.176.1] (ovpn-64-194.rdu2.redhat.com [10.10.64.194]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 443F919C59; Thu, 12 Nov 2020 18:49:17 +0000 (UTC) From: "Benjamin Coddington" To: "Trond Myklebust" Cc: dwysocha@redhat.com, linux-nfs@vger.kernel.org Subject: Re: [PATCH v5 00/22] Readdir enhancements Date: Thu, 12 Nov 2020 13:49:16 -0500 Message-ID: In-Reply-To: References: <20201110213741.860745-1-trondmy@kernel.org> <723ef5d47994e34804f5514b06940e96620e2b70.camel@hammerspace.com> <6b07ff95824f5b46237fa07f5f72d8261d764007.camel@hammerspace.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On 12 Nov 2020, at 13:39, Benjamin Coddington wrote: > On 12 Nov 2020, at 13:26, Trond Myklebust wrote: > >> On Thu, 2020-11-12 at 16:51 +0000, Trond Myklebust wrote: >>> >>> I was going to ask you if perhaps reverting Scott's commit >>> 07b5ce8ef2d8 >>> ("NFS: Make nfs_readdir revalidate less often") might help here? >>> My thinking is that will trigger more cache invalidations when the >>> directory is changing underneath us, and will now trigger uncached >>> readdir in those situations. >>> >>>> >> >> IOW, the suggestion would be to apply something like the following on >> top of the existing readdir patchset: > > I'm all for this approach, but - I'm rarely seeing the > mapping->nrpages == 0 > since the cache is dropped by a process in nfs_readdir() that > immediately > starts filling the cache again. > > It would make a lot more sense to me if we could do something like > stash > desc->page_index << PAGE_SHIFT in f_pos after each nfs_readdir, then > the > hueristic could check f_pos >> PAGE_SHIFT > nrpages. > > Yes, f_pos is growing many different meanings in NFS directories, > maybe we > can stash it on the directory context. Ignore the f_pos suggestion -- iterate_dir sets it for us.. would have to use a private value. Ben