From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl0-f69.google.com (mail-pl0-f69.google.com [209.85.160.69]) by kanga.kvack.org (Postfix) with ESMTP id 18D276B0005 for ; Mon, 16 Jul 2018 08:41:33 -0400 (EDT) Received: by mail-pl0-f69.google.com with SMTP id d22-v6so6942318pls.4 for ; Mon, 16 Jul 2018 05:41:33 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2607:7c80:54:e::133]) by mx.google.com with ESMTPS id x62-v6si34848938pfd.124.2018.07.16.05.41.31 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Jul 2018 05:41:31 -0700 (PDT) Date: Mon, 16 Jul 2018 05:41:15 -0700 From: Matthew Wilcox Subject: Re: [PATCH v6 0/7] fs/dcache: Track & limit # of negative dentries Message-ID: <20180716124115.GA7072@bombadil.infradead.org> References: <18c5cbfe-403b-bb2b-1d11-19d324ec6234@redhat.com> <1531336913.3260.18.camel@HansenPartnership.com> <4d49a270-23c9-529f-f544-65508b6b53cc@redhat.com> <1531411494.18255.6.camel@HansenPartnership.com> <20180712164932.GA3475@bombadil.infradead.org> <1531416080.18255.8.camel@HansenPartnership.com> <1531425435.18255.17.camel@HansenPartnership.com> <20180713003614.GW2234@dastard> <20180716090901.GG17280@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180716090901.GG17280@dhcp22.suse.cz> Sender: owner-linux-mm@kvack.org List-ID: To: Michal Hocko Cc: Dave Chinner , James Bottomley , Linus Torvalds , Waiman Long , Al Viro , Jonathan Corbet , "Luis R. Rodriguez" , Kees Cook , Linux Kernel Mailing List , linux-fsdevel , linux-mm , "open list:DOCUMENTATION" , Jan Kara , Paul McKenney , Andrew Morton , Ingo Molnar , Miklos Szeredi , Larry Woodman , "Wangkai (Kevin,C)" On Mon, Jul 16, 2018 at 11:09:01AM +0200, Michal Hocko wrote: > On Fri 13-07-18 10:36:14, Dave Chinner wrote: > [...] > > By limiting the number of negative dentries in this case, internal > > slab fragmentation is reduced such that reclaim cost never gets out > > of control. While it appears to "fix" the symptoms, it doesn't > > address the underlying problem. It is a partial solution at best but > > at worst it's another opaque knob that nobody knows how or when to > > tune. > > Would it help to put all the negative dentries into its own slab cache? Maybe the dcache should be more sensitive to its own needs. In __d_alloc, it could check whether there are a high proportion of negative dentries and start recycling some existing negative dentries.