Re: [BUG] lock_parent() breakage when used from shrink_dentry_list() (was Re: [PATCH v2 6/6] fs/dcache: Avoid remaining try_lock loop in shrink_dentry_list())

2018-03-02 Thread Sebastian Andrzej Siewior
On 2018-02-25 07:40:05 [+], Al Viro wrote: > FWIW, a variant of that series is in #work.dcache; it's > almost certainly not the final (I want to clean the things up > and probably reorder them as well) and it needs one hell of > profiling and review. It seems to work, and I don't see any >

Re: [BUG] lock_parent() breakage when used from shrink_dentry_list() (was Re: [PATCH v2 6/6] fs/dcache: Avoid remaining try_lock loop in shrink_dentry_list())

2018-03-02 Thread Sebastian Andrzej Siewior
On 2018-02-25 07:40:05 [+], Al Viro wrote: > FWIW, a variant of that series is in #work.dcache; it's > almost certainly not the final (I want to clean the things up > and probably reorder them as well) and it needs one hell of > profiling and review. It seems to work, and I don't see any >

Re: [BUG] lock_parent() breakage when used from shrink_dentry_list() (was Re: [PATCH v2 6/6] fs/dcache: Avoid remaining try_lock loop in shrink_dentry_list())

2018-02-24 Thread Al Viro
On Sat, Feb 24, 2018 at 12:22:48AM +, Al Viro wrote: > On Fri, Feb 23, 2018 at 01:35:52PM -0800, Linus Torvalds wrote: > > > This is too subtle, and your fix to check d_lockref.count < 0 sounds > > wrong to me. If it's really gone, maybe it has been reused and the > > refcount is positive

Re: [BUG] lock_parent() breakage when used from shrink_dentry_list() (was Re: [PATCH v2 6/6] fs/dcache: Avoid remaining try_lock loop in shrink_dentry_list())

2018-02-24 Thread Al Viro
On Sat, Feb 24, 2018 at 12:22:48AM +, Al Viro wrote: > On Fri, Feb 23, 2018 at 01:35:52PM -0800, Linus Torvalds wrote: > > > This is too subtle, and your fix to check d_lockref.count < 0 sounds > > wrong to me. If it's really gone, maybe it has been reused and the > > refcount is positive

Re: [BUG] lock_parent() breakage when used from shrink_dentry_list() (was Re: [PATCH v2 6/6] fs/dcache: Avoid remaining try_lock loop in shrink_dentry_list())

2018-02-23 Thread Al Viro
On Fri, Feb 23, 2018 at 01:35:52PM -0800, Linus Torvalds wrote: > This is too subtle, and your fix to check d_lockref.count < 0 sounds > wrong to me. If it's really gone, maybe it has been reused and the > refcount is positive again, but it's something else than a dentry > entirely? > > Hmm. >

Re: [BUG] lock_parent() breakage when used from shrink_dentry_list() (was Re: [PATCH v2 6/6] fs/dcache: Avoid remaining try_lock loop in shrink_dentry_list())

2018-02-23 Thread Al Viro
On Fri, Feb 23, 2018 at 01:35:52PM -0800, Linus Torvalds wrote: > This is too subtle, and your fix to check d_lockref.count < 0 sounds > wrong to me. If it's really gone, maybe it has been reused and the > refcount is positive again, but it's something else than a dentry > entirely? > > Hmm. >

Re: [BUG] lock_parent() breakage when used from shrink_dentry_list() (was Re: [PATCH v2 6/6] fs/dcache: Avoid remaining try_lock loop in shrink_dentry_list())

2018-02-23 Thread Linus Torvalds
On Fri, Feb 23, 2018 at 12:13 PM, Al Viro wrote: > Look: > dentry placed on a shrink list > we pick the fucker from the list and lock it. > we call lock_parent() on it. > dentry is not a root and it's not deleted, so we proceed. >

Re: [BUG] lock_parent() breakage when used from shrink_dentry_list() (was Re: [PATCH v2 6/6] fs/dcache: Avoid remaining try_lock loop in shrink_dentry_list())

2018-02-23 Thread Linus Torvalds
On Fri, Feb 23, 2018 at 12:13 PM, Al Viro wrote: > Look: > dentry placed on a shrink list > we pick the fucker from the list and lock it. > we call lock_parent() on it. > dentry is not a root and it's not deleted, so we proceed. > trylock

[BUG] lock_parent() breakage when used from shrink_dentry_list() (was Re: [PATCH v2 6/6] fs/dcache: Avoid remaining try_lock loop in shrink_dentry_list())

2018-02-23 Thread Al Viro
On Fri, Feb 23, 2018 at 05:42:16PM +, Al Viro wrote: > 4) the nasty one - shrink_dentry_list() evictions of zero-count > dentries. > _That_ calls for careful use of RCU, etc. - none of the others need that. > Need > to think how to deal with that sucker; in any case, I do not believe

[BUG] lock_parent() breakage when used from shrink_dentry_list() (was Re: [PATCH v2 6/6] fs/dcache: Avoid remaining try_lock loop in shrink_dentry_list())

2018-02-23 Thread Al Viro
On Fri, Feb 23, 2018 at 05:42:16PM +, Al Viro wrote: > 4) the nasty one - shrink_dentry_list() evictions of zero-count > dentries. > _That_ calls for careful use of RCU, etc. - none of the others need that. > Need > to think how to deal with that sucker; in any case, I do not believe