From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 2 Jul 2018 15:21:05 -0700 From: Matthew Wilcox To: Andrew Morton Cc: Linus Torvalds , Waiman Long , Al Viro , Linux Kernel Mailing List , linux-fsdevel , Jan Kara , Paul McKenney , Ingo Molnar , Miklos Szeredi , Larry Woodman , James Bottomley , "Wangkai (Kevin,C)" , linux-mm@kvack.org, Michal Hocko Subject: Re: [PATCH v5 0/6] fs/dcache: Track & limit # of negative dentries Message-ID: <20180702222105.GA2438@bombadil.infradead.org> References: <1530510723-24814-1-git-send-email-longman@redhat.com> <20180702141811.ef027fd7d8087b7fb2ba0cce@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180702141811.ef027fd7d8087b7fb2ba0cce@linux-foundation.org> Sender: owner-linux-mm@kvack.org List-ID: On Mon, Jul 02, 2018 at 02:18:11PM -0700, Andrew Morton wrote: > In the [5/6] changelog it is mentioned that a large number of -ve > dentries can lead to oom-killings. This sounds bad - -ve dentries > should be trivially reclaimable and we shouldn't be oom-killing in such > a situation. > > Dumb question: do we know that negative dentries are actually > worthwhile? Has anyone checked in the past couple of decades? Perhaps > our lookups are so whizzy nowadays that we don't need them? I can't believe that's true. Have you looked at strace of a typical program startup recently? $ strace -o ls.out ls $ grep -c ENOENT ls.out 10 There's a few duplicates in there (6 accesses to /etc/ld.so.nohwcap), so we definitely want those negative entries.