From: Eric Wheeler <bcache@lists.ewheeler.net>
To: Jiri Kosina <jikos@kernel.org>
Cc: Kent Overstreet <kent.overstreet@gmail.com>,
linux-bcache@vger.kernel.org, linux-kernel@vger.kernel.org,
Maciej Piechotka <uzytkownik2@gmail.com>
Subject: Re: [PATCH] bcache: bch_writeback_thread() is not freezable
Date: Tue, 19 Apr 2016 20:55:01 +0000 (UTC) [thread overview]
Message-ID: <alpine.LRH.2.11.1604192050290.16630@mail.ewheeler.net> (raw)
In-Reply-To: <alpine.LNX.2.00.1604191421130.27368@cbobk.fhfr.pm>
On Tue, 19 Apr 2016, Jiri Kosina wrote:
> From: Jiri Kosina <jkosina@suse.cz>
>
> 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 <jkosina@suse.cz>
> ---
> 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 <linux/delay.h>
> -#include <linux/freezer.h>
> #include <linux/kthread.h>
> #include <trace/events/bcache.h>
>
> @@ -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
>
next prev parent reply other threads:[~2016-04-19 21:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-19 12:33 Jiri Kosina
2016-04-19 12:34 ` [PATCH] bcache: bch_allocator_thread() " Jiri Kosina
2016-04-19 12:35 ` [PATCH] bcache: bch_gc_thread() " Jiri Kosina
2016-04-19 20:55 ` Eric Wheeler [this message]
2016-04-19 22:25 ` [PATCH] bcache: bch_writeback_thread() " Jiri Kosina
2016-04-22 1:19 ` Eric Wheeler
2016-04-25 8:19 ` Jiri Kosina
2016-05-02 7:16 ` Jiri Kosina
2016-05-11 1:13 ` Eric Wheeler
2016-05-11 7:55 ` Jiri Kosina
2016-05-18 15:28 ` Jiri Kosina
2016-05-23 23:05 ` Jiri Kosina
2016-05-24 14:18 ` Jens Axboe
2016-05-24 14:20 ` Jiri Kosina
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LRH.2.11.1604192050290.16630@mail.ewheeler.net \
--to=bcache@lists.ewheeler.net \
--cc=jikos@kernel.org \
--cc=kent.overstreet@gmail.com \
--cc=linux-bcache@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=uzytkownik2@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®