Re: [PATCH v2] bcache: fix deadlock in bcache_allocator

2019-08-07 Thread Coly Li
On 2019/8/7 5:25 下午, Andrea Righi wrote: > On Tue, Aug 06, 2019 at 07:36:48PM +0200, Andrea Righi wrote: >> On Tue, Aug 06, 2019 at 11:18:01AM +0200, Andrea Righi wrote: >>> bcache_allocator() can call the following: >>> >>> bch_allocator_thread() >>> -> bch_prio_write() >>> -> bch_bucket_a

Re: [PATCH v2] bcache: fix deadlock in bcache_allocator

2019-08-07 Thread Andrea Righi
On Tue, Aug 06, 2019 at 07:36:48PM +0200, Andrea Righi wrote: > On Tue, Aug 06, 2019 at 11:18:01AM +0200, Andrea Righi wrote: > > bcache_allocator() can call the following: > > > > bch_allocator_thread() > > -> bch_prio_write() > > -> bch_bucket_alloc() > > -> wait on &ca->set->buc

Re: [PATCH v2] bcache: fix deadlock in bcache_allocator

2019-08-06 Thread Andrea Righi
On Tue, Aug 06, 2019 at 11:18:01AM +0200, Andrea Righi wrote: > bcache_allocator() can call the following: > > bch_allocator_thread() > -> bch_prio_write() > -> bch_bucket_alloc() > -> wait on &ca->set->bucket_wait > > But the wake up event on bucket_wait is supposed to come from

Re: [PATCH v2] bcache: fix deadlock in bcache_allocator

2019-08-06 Thread Coly Li
On 2019/8/6 5:18 下午, Andrea Righi wrote: > bcache_allocator() can call the following: > > bch_allocator_thread() > -> bch_prio_write() > -> bch_bucket_alloc() > -> wait on &ca->set->bucket_wait > > But the wake up event on bucket_wait is supposed to come from > bch_allocator_threa

[PATCH v2] bcache: fix deadlock in bcache_allocator

2019-08-06 Thread Andrea Righi
bcache_allocator() can call the following: bch_allocator_thread() -> bch_prio_write() -> bch_bucket_alloc() -> wait on &ca->set->bucket_wait But the wake up event on bucket_wait is supposed to come from bch_allocator_thread() itself => deadlock: [ 1158.490744] INFO: task bcache_a