[lkml]   [2016]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] bcache: bch_writeback_thread() is not freezable
On Tue, 19 Apr 2016, Eric Wheeler wrote:

> > bch_writeback_thread() is calling try_to_freeze(), but that's just an
> > expensive no-op given the fact that the thread is not marked freezable.
> >
> > I/O helper kthreads, exactly such as the bcache writeback thread, actually
> > shouldn't be freezable, because they are potentially necessary for
> > finalizing the image write-out.
> This is good timing, as Maciej Piechotka just reported a hang when
> suspending his system.

Could you please point me to the actual report? Thanks.

> What is the proper way to safely support suspend? Assuming the
> try_to_freeze() calls are in the right place, should we simply
> set_freezable() on these kthreads?

Unfortunately, this is really a tricky question; the issue is that frezing
semantics is rather undefined for kthreads. For starters, please see

I don't belive in freezable kthreads which serve as I/O helpers. Such
threads simply have to keep going until the image is written out and
machine powered down.

So I'd like to start with understanding how bcache is preventning suspend.


Jiri Kosina

 \ /
  Last update: 2016-04-20 00:41    [W:0.495 / U:5.076 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site