[PATCH 4.4 030/131] Hang/soft lockup in d_invalidate with simultaneous calls

2019-04-01 Thread Greg Kroah-Hartman
4.4-stable review patch. If anyone has any objections, please let me know. -- From: Al Viro commit 81be24d263dbeddaba35827036d6f6787a59c2c3 upstream. It's not hard to trigger a bunch of d_invalidate() on the same dentry in parallel. They end up fighting each other - any dentr

[PATCH 4.9 21/30] Hang/soft lockup in d_invalidate with simultaneous calls

2019-03-25 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Al Viro commit 81be24d263dbeddaba35827036d6f6787a59c2c3 upstream. It's not hard to trigger a bunch of d_invalidate() on the same dentry in parallel. They end up fighting each other - any dentr

Re: [BACKPORT 4.4.y 20/25] Hang/soft lockup in d_invalidate with simultaneous calls

2019-03-25 Thread Greg KH
On Fri, Mar 22, 2019 at 04:44:11PM +0100, Arnd Bergmann wrote: > From: Al Viro > > It's not hard to trigger a bunch of d_invalidate() on the same > dentry in parallel. They end up fighting each other - any > dentry picked for removal by one will be skipped by the rest > and we'll go for the next

[BACKPORT 4.4.y 20/25] Hang/soft lockup in d_invalidate with simultaneous calls

2019-03-22 Thread Arnd Bergmann
From: Al Viro It's not hard to trigger a bunch of d_invalidate() on the same dentry in parallel. They end up fighting each other - any dentry picked for removal by one will be skipped by the rest and we'll go for the next iteration through the entire subtree, even if everything is being skipped.

Re: Hang/soft lockup in d_invalidate with simultaneous calls

2017-06-15 Thread Al Viro
On Mon, Jun 12, 2017 at 04:00:45PM -0700, Khazhismel Kumykov wrote: > On Fri, Jun 2, 2017 at 11:47 PM, Khazhismel Kumykov wrote: > > On Fri, Jun 2, 2017 at 11:20 PM, Al Viro wrote: > >> The thing is, unlike shrink_dcache_parent() we *can* bugger off as > >> soon as we'd found no victims, nothing

Re: Hang/soft lockup in d_invalidate with simultaneous calls

2017-06-12 Thread Khazhismel Kumykov
On Fri, Jun 2, 2017 at 11:47 PM, Khazhismel Kumykov wrote: > On Fri, Jun 2, 2017 at 11:20 PM, Al Viro wrote: >> The thing is, unlike shrink_dcache_parent() we *can* bugger off as >> soon as we'd found no victims, nothing mounted and dentry itself >> is unhashed. We can't do anything in select_co

Re: Hang/soft lockup in d_invalidate with simultaneous calls

2017-06-02 Thread Khazhismel Kumykov
On Fri, Jun 2, 2017 at 11:20 PM, Al Viro wrote: > The thing is, unlike shrink_dcache_parent() we *can* bugger off as > soon as we'd found no victims, nothing mounted and dentry itself > is unhashed. We can't do anything in select_collect() (we would've > broken shrink_dcache_parent() that way), b

Re: Hang/soft lockup in d_invalidate with simultaneous calls

2017-06-02 Thread Al Viro
On Fri, Jun 02, 2017 at 10:22:39PM -0700, Khazhismel Kumykov wrote: > On Fri, Jun 2, 2017 at 6:12 PM, Al Viro wrote: > > Part of that could be relieved if we turned check_and_drop() into > > static void check_and_drop(void *_data) > > { > > struct detach_data *data = _data; > > > >

Re: Hang/soft lockup in d_invalidate with simultaneous calls

2017-06-02 Thread Khazhismel Kumykov
On Fri, Jun 2, 2017 at 6:12 PM, Al Viro wrote: > Part of that could be relieved if we turned check_and_drop() into > static void check_and_drop(void *_data) > { > struct detach_data *data = _data; > > if (!data->mountpoint && list_empty(&data->select.dispose)) > __d

Re: Hang/soft lockup in d_invalidate with simultaneous calls

2017-06-02 Thread Al Viro
On Wed, May 17, 2017 at 02:58:11PM -0700, Khazhismel Kumykov wrote: > Once the dentry is on a shrink list would > it be unreachable anyways, Why would it be? Suppose e.g. shrink_dcache_parent() finds a dentry with zero refcount; to the shrink list it goes, right? Then, before we actually get ar

Re: Hang/soft lockup in d_invalidate with simultaneous calls

2017-05-25 Thread Khazhismel Kumykov
On Mon, May 22, 2017 at 11:18 AM, Khazhismel Kumykov wrote: > On Wed, May 17, 2017 at 2:58 PM Khazhismel Kumykov wrote: >> >> On Mon, May 15, 2017 at 5:05 PM, Khazhismel Kumykov >> wrote: >> > Hi, >> > >> > I'm seeing behavior in d_invalidate, if multiple threads call d_invalidate >> > on >> >

Re: Hang/soft lockup in d_invalidate with simultaneous calls

2017-05-22 Thread Khazhismel Kumykov
On Wed, May 17, 2017 at 2:58 PM Khazhismel Kumykov wrote: > > On Mon, May 15, 2017 at 5:05 PM, Khazhismel Kumykov wrote: > > Hi, > > > > I'm seeing behavior in d_invalidate, if multiple threads call d_invalidate > > on > > the same tree at the same, behavior time blows up and all the calls hang

Re: Hang/soft lockup in d_invalidate with simultaneous calls

2017-05-17 Thread Khazhismel Kumykov
On Mon, May 15, 2017 at 5:05 PM, Khazhismel Kumykov wrote: > Hi, > > I'm seeing behavior in d_invalidate, if multiple threads call d_invalidate on > the same tree at the same, behavior time blows up and all the calls hang with > large enough trees/enough simultaneous callers. (e.g. a directory w/

Hang/soft lockup in d_invalidate with simultaneous calls

2017-05-15 Thread Khazhismel Kumykov
Hi, I'm seeing behavior in d_invalidate, if multiple threads call d_invalidate on the same tree at the same, behavior time blows up and all the calls hang with large enough trees/enough simultaneous callers. (e.g. a directory w/ 100k entries in d_subdir, and 5 or so threads calling d_invalidate wa