Re: [PATCH] bcache: fix deadlock in bcache_allocator()

2019-08-06 Thread Andrea Righi
On Wed, Jul 10, 2019 at 05:46:56PM +0200, Andrea Righi wrote: > On Wed, Jul 10, 2019 at 11:11:37PM +0800, Coly Li wrote: > > On 2019/7/10 5:31 下午, Andrea Righi wrote: > > > bcache_allocator() can call the following: > > > > > > bch_allocator_thread() > > > -> bch_prio_write() > > > -> bch_

Re: [PATCH] bcache: fix deadlock in bcache_allocator()

2019-07-10 Thread Coly Li
On 2019/7/10 11:46 下午, Andrea Righi wrote: > On Wed, Jul 10, 2019 at 11:11:37PM +0800, Coly Li wrote: >> On 2019/7/10 5:31 下午, Andrea Righi wrote: >>> bcache_allocator() can call the following: >>> >>> bch_allocator_thread() >>> -> bch_prio_write() >>> -> bch_bucket_alloc() >>> -> w

Re: [PATCH] bcache: fix deadlock in bcache_allocator()

2019-07-10 Thread Andrea Righi
On Wed, Jul 10, 2019 at 11:11:37PM +0800, Coly Li wrote: > On 2019/7/10 5:31 下午, 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

Re: [PATCH] bcache: fix deadlock in bcache_allocator()

2019-07-10 Thread Coly Li
On 2019/7/10 5:31 下午, 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_thre

[PATCH] bcache: fix deadlock in bcache_allocator()

2019-07-10 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: [ 242.888435] INFO: task bcache_a