Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp248659ybf; Thu, 27 Feb 2020 20:22:53 -0800 (PST) X-Google-Smtp-Source: APXvYqwk8e7+D8q0dmrPiqaAHLem9IKXk17dzera1wLx7p1jAU2rEKLTB/KnLKb00aAIHexoBhIC X-Received: by 2002:a05:6830:1b73:: with SMTP id d19mr1677310ote.101.1582863772995; Thu, 27 Feb 2020 20:22:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582863772; cv=none; d=google.com; s=arc-20160816; b=0e+whp0izFS19fbd04/SKyXKMAMwtFZhDuFt2FqP7+JTuhQk0sdWa+hrWnSw+Io8+8 GLQi4wzuqV4HqQHrv80oS/ytLJDssGZssuc6PQfbdyZjbrlL9p3R7udpDbFk1tOdgukS yNlCtZeCr/IjbQkfU2AET9nJIzhmI3tXHv2S/3EI/si+tRfW8kwoa8Yv9FSPMOkdptDK o/uJzD19X+cNwvdgUKrDnE3QIWMfxPaycFTPatSk6HSJ2sQEq7J9XsqOveTC2pMMyy1B 5c5v6TBs195f2j5TXCnFjSgCP+Jjm8pekQ68DYl28zl0GahUj7eNpyceC1lF3zyjTnRb kgOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=r2K0LXgbU7Ja7hFYvPB8yyqrzPIYn3GsXGj2LJpfCac=; b=RimvMTtQw1zuKhiUtqTGQrbJwHCMlPB4Os28Wb2jfDSemwKwsURJ8Kq4metV914nOL Kg4LeOFCsyY4zVEbQG2K7lhcxyhWlkgO5rD2FFA33xrPjbGpxelqWNth6giWo3qFDq7T h1bKvhlNraFbaObdYmRM58gNWPuQGl8R1TZzx4udY6D+Xg7Dp3eSzB+B7Ag4iBcxrF/Q tUBO0hV+VuIzM2j5VCl9fYsCEutYJr/sabSUDMyyFd3ZT/yD1x/CFd6R1hiNXGm/rD/b WFhoFxR1Kb9R16Nj0jiToZ18h/Z7Jn253G4Xt2pYRNaTY/GXrqlpbs/j5irILaUVye27 lp/A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u12si1133376oiv.13.2020.02.27.20.22.41; Thu, 27 Feb 2020 20:22:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730879AbgB1EWT (ORCPT + 99 others); Thu, 27 Feb 2020 23:22:19 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:53448 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730815AbgB1EWT (ORCPT ); Thu, 27 Feb 2020 23:22:19 -0500 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1j7XA8-002DXv-ND; Fri, 28 Feb 2020 04:22:08 +0000 Date: Fri, 28 Feb 2020 04:22:08 +0000 From: Al Viro To: Matthew Wilcox Cc: Ian Kent , Andreas Dilger , Waiman Long , Jonathan Corbet , Luis Chamberlain , Kees Cook , Iurii Zaikin , Linux Kernel Mailing List , Linux FS Devel , linux-doc@vger.kernel.org, Mauro Carvalho Chehab , Eric Biggers , Dave Chinner , Eric Sandeen Subject: Re: [PATCH 00/11] fs/dcache: Limit # of negative dentries Message-ID: <20200228042208.GI23230@ZenIV.linux.org.uk> References: <20200226161404.14136-1-longman@redhat.com> <20200226162954.GC24185@bombadil.infradead.org> <2EDB6FFC-C649-4C80-999B-945678F5CE87@dilger.ca> <9d7b76c32d09492137a253e692624856388693db.camel@themaw.net> <20200228033412.GD29971@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200228033412.GD29971@bombadil.infradead.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 27, 2020 at 07:34:12PM -0800, Matthew Wilcox wrote: > On Thu, Feb 27, 2020 at 05:55:43PM +0800, Ian Kent wrote: > > Not all file systems even produce negative hashed dentries. > > > > The most beneficial use of them is to improve performance of rapid > > fire lookups for non-existent names. Longer lived negative hashed > > dentries don't give much benefit at all unless they suddenly have > > lots of hits and that would cost a single allocation on the first > > lookup if the dentry ttl expired and the dentry discarded. > > > > A ttl (say jiffies) set at appropriate times could be a better > > choice all round, no sysctl values at all. > > The canonical argument in favour of negative dentries is to improve > application startup time as every application searches the library path > for the same libraries. Only they don't do that any more: Tell that to scripts that keep looking through $PATH for binaries each time they are run. Tell that to cc(1) looking through include path, etc. Ian, autofs is deeply pathological in that respect; that's OK, since it has very unusual needs, but please don't use it as a model for anything else - its needs *are* unusual.