linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Re: [bug report] bcache stucked when writting jounrnal
@ 2017-11-23  1:08 tang.junhui
  0 siblings, 0 replies; only message in thread
From: tang.junhui @ 2017-11-23  1:08 UTC (permalink / raw)
  To: huarui.dev; +Cc: colyli, mlyle, linux-bcache, linux-block, tang.junhui

From: Tang Junhui <tang.junhui@zte.com.cn>

Hi, RuiHua:

> I have met the similar problem once.
> It looks like a deadlock between the cache device register thread and
> bcache_allocator thread.
> 
> The trace info tell us the journal is full, probablely the allocator
> thread waits on bch_prio_write()->prio_io()->bch_journal_meta(), but
> there is no RESERVE_BTREE buckets to use for journal replay at this
> time, so register thread waits on
> bch_journal_replay()->bch_btree_insert()
> 
> The path which your register command possibly blocked:
> run_cache_set()
>   -> bch_journal_replay()
>       -> bch_btree_insert()
>           -> btree_insert_fn()
>               -> bch_btree_insert_node()
>                   -> btree_split()
>                       -> btree_check_reserve() ----here we find
> RESERVE_BTREE buckets is empty, and then schedule out...
> 
> bch_allocator_thread()
>   ->bch_prio_write()
>      ->bch_journal_meta()
> 
> 
> You can apply this patch to your code and try to register again. This
> is for your reference only. Because this patch was not verified in my
> environment, because my env was damaged last time before I dig into
> code and write this patch, I hopefully it can resolve your problem:-)
Thanks very much, your advice and pathch gave me a lot of inspiration,
I will do an further analysis, and apply this patch then have a try again.

Thanks,
Tang

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-11-23  1:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-23  1:08 Re: [bug report] bcache stucked when writting jounrnal tang.junhui

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).