Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933470AbcDSVCA (ORCPT ); Tue, 19 Apr 2016 17:02:00 -0400 Received: from [66.155.3.69] ([66.155.3.69]:39438 "EHLO mail.ewheeler.net" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S932713AbcDSVB7 (ORCPT ); Tue, 19 Apr 2016 17:01:59 -0400 X-Greylist: delayed 398 seconds by postgrey-1.27 at vger.kernel.org; Tue, 19 Apr 2016 17:01:59 EDT Date: Tue, 19 Apr 2016 20:55:01 +0000 (UTC) From: Eric Wheeler X-X-Sender: lists@mail.ewheeler.net To: Jiri Kosina cc: Kent Overstreet , linux-bcache@vger.kernel.org, linux-kernel@vger.kernel.org, Maciej Piechotka Subject: Re: [PATCH] bcache: bch_writeback_thread() is not freezable In-Reply-To: Message-ID: References: User-Agent: Alpine 2.11 (LRH 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1817 Lines: 67 On Tue, 19 Apr 2016, Jiri Kosina wrote: > From: Jiri Kosina > > 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. 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? -- Eric Wheeler > > Signed-off-by: Jiri Kosina > --- > drivers/md/bcache/writeback.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/md/bcache/writeback.c b/drivers/md/bcache/writeback.c > index b9346cd..6012367 100644 > --- a/drivers/md/bcache/writeback.c > +++ b/drivers/md/bcache/writeback.c > @@ -12,7 +12,6 @@ > #include "writeback.h" > > #include > -#include > #include > #include > > @@ -228,7 +227,6 @@ static void read_dirty(struct cached_dev *dc) > */ > > while (!kthread_should_stop()) { > - try_to_freeze(); > > w = bch_keybuf_next(&dc->writeback_keys); > if (!w) > @@ -433,7 +431,6 @@ static int bch_writeback_thread(void *arg) > if (kthread_should_stop()) > return 0; > > - try_to_freeze(); > schedule(); > continue; > } > -- > Jiri Kosina > SUSE Labs > > -- > To unsubscribe from this list: send the line "unsubscribe linux-bcache" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >