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

2019-10-10 Thread Coly Li
On 2019/10/10 11:21 下午, Andrea Righi wrote: > On Wed, Aug 07, 2019 at 09:53:46PM +0800, Coly Li wrote: >> On 2019/8/7 6:38 下午, Andrea Righi wrote: >>> bcache_allocator can call the following: >>> >>> bch_allocator_thread() >>> -> bch_prio_write() >>> -> bch_bucket_alloc() >>> -> wai

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

2019-10-10 Thread Andrea Righi
On Wed, Aug 07, 2019 at 09:53:46PM +0800, Coly Li wrote: > On 2019/8/7 6:38 下午, 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 wa

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

2019-08-07 Thread Coly Li
On 2019/8/7 6:38 下午, 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_thread(

[PATCH v3] bcache: fix deadlock in bcache_allocator

2019-08-07 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_all