Re: [PATCH RFC 1/6] dcache: sweep cached negative dentries to the end of list of siblings

2021-04-15 Thread Al Viro
On Wed, Apr 14, 2021 at 03:00:48AM +, Al Viro wrote: > Ugh... So when dput() drives the refcount down to 0 you hit lock_parent() > and only then bother to check if the sucker had been negative in the first ^

Re: [PATCH RFC 1/6] dcache: sweep cached negative dentries to the end of list of siblings

2021-04-15 Thread Al Viro
On Wed, Apr 14, 2021 at 03:41:10AM +, Al Viro wrote: > > + if (!d_is_tail_negative(dentry)) { > > + parent = lock_parent(dentry); > > + if (!parent) > > + return; > > Wait a minute. It's not a good environment for calling lock_parent(). > Who said that

Re: [PATCH RFC 1/6] dcache: sweep cached negative dentries to the end of list of siblings

2021-04-13 Thread Al Viro
On Thu, Jan 21, 2021 at 06:49:40PM +0530, Gautham Ananthakrishna wrote: > +static void sweep_negative(struct dentry *dentry) > +{ > + struct dentry *parent; > + > + if (!d_is_tail_negative(dentry)) { > + parent = lock_parent(dentry); > + if (!parent) > +

Re: [PATCH RFC 1/6] dcache: sweep cached negative dentries to the end of list of siblings

2021-04-13 Thread Al Viro
On Thu, Jan 21, 2021 at 06:49:40PM +0530, Gautham Ananthakrishna wrote: > From: Konstantin Khlebnikov > > For disk filesystems result of every negative lookup is cached, content of > directories is usually cached too. Production of negative dentries isn't > limited with disk speed. It's really ea

[PATCH RFC 1/6] dcache: sweep cached negative dentries to the end of list of siblings

2021-01-21 Thread Gautham Ananthakrishna
From: Konstantin Khlebnikov For disk filesystems result of every negative lookup is cached, content of directories is usually cached too. Production of negative dentries isn't limited with disk speed. It's really easy to generate millions of them if system has enough memory. Negative dentries are