[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <caf309f5-2844-6546-e545-6ae56ad7d022@redhat.com>
Date: Wed, 18 Jul 2018 12:17:24 -0400
From: Waiman Long <longman@...hat.com>
To: Michal Hocko <mhocko@...nel.org>,
Dave Chinner <david@...morbit.com>
Cc: James Bottomley <James.Bottomley@...senPartnership.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Matthew Wilcox <willy@...radead.org>,
Al Viro <viro@...iv.linux.org.uk>,
Jonathan Corbet <corbet@....net>,
"Luis R. Rodriguez" <mcgrof@...nel.org>,
Kees Cook <keescook@...omium.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
linux-mm <linux-mm@...ck.org>,
"open list:DOCUMENTATION" <linux-doc@...r.kernel.org>,
Jan Kara <jack@...e.cz>,
Paul McKenney <paulmck@...ux.vnet.ibm.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Ingo Molnar <mingo@...nel.org>,
Miklos Szeredi <mszeredi@...hat.com>,
Larry Woodman <lwoodman@...hat.com>,
"Wangkai (Kevin,C)" <wangkai86@...wei.com>
Subject: Re: [PATCH v6 0/7] fs/dcache: Track & limit # of negative dentries
On 07/16/2018 05:09 AM, 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?
>
>> Very few microbenchmarks expose this internal slab fragmentation
>> problem because they either don't run long enough, don't create
>> memory pressure, or don't have access patterns that mix long and
>> short term slab objects together in a way that causes slab
>> fragmentation. Run some cold cache directory traversals (git
>> status?) at the same time you are creating negative dentries so you
>> create pinned partial pages in the slab cache and see how the
>> behaviour changes....
> Agreed! Slab fragmentation is a real problem we are seeing for quite
> some time. We should try to address it rather than paper over it with
> weird knobs.
I am aware that you don't like the limit knob that control how many
negative dentries are allowed as a percentage of total system memory. I
got comments in the past about doing some kind of auto-tuning. How about
consolidating the 2 knobs that I currently have in the patchset into a
single one with 3 possible values, like:
0 - no limiting
1 - set soft limit to "a constant + 4 x max # of positive dentries" and
warn if exceeded
2 - same limit but kill excess negative dentries after use.
Does that kind of knob make more sense to you?
Cheers,
Longman
Powered by blists - more mailing lists