From: David Teigland <teigland@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 10/17] dlm: use schedule_timeout instead of schedule in dlm_recoverd
Date: Tue, 22 Aug 2017 13:21:02 -0500 [thread overview]
Message-ID: <20170822182102.GA20358@redhat.com> (raw)
In-Reply-To: <358547de27294c7596788437f652d734@TGXML394.toshiba.local>
On Thu, Aug 17, 2017 at 11:40:13PM +0000, tsutomu.owa at toshiba.co.jp wrote:
> If you refer to other implementations in kernel, the following
> modifications may be better.
> The important thing is to call kthread_should_stop() after
> set_current_state(TASK_INTERRUPTIBLE). How is this fix?
Thanks, I prefer this. Perhaps put that explanation in a comment, e.g.
> --- fs/dlm/recoverd.c.orig 2017-08-10 16:42:31.131296351 +0900
> +++ fs/dlm/recoverd.c 2017-08-10 16:43:22.483295232 +0900
> @@ -287,8 +287,10 @@
> set_bit(LSFL_RECOVER_LOCK, &ls->ls_flags);
> wake_up(&ls->ls_recover_lock_wait);
>
> - while (!kthread_should_stop()) {
> + while (1) {
/* call kthread_should_stop() after set_current_state() /
> set_current_state(TASK_INTERRUPTIBLE);
> + if (kthread_should_stop())
> + break;
> if (!test_bit(LSFL_RECOVER_WORK, &ls->ls_flags) &&
> !test_bit(LSFL_RECOVER_DOWN, &ls->ls_flags))
> schedule();
>
prev parent reply other threads:[~2017-08-22 18:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-09 5:51 [Cluster-devel] [PATCH 10/17] dlm: use schedule_timeout instead of schedule in dlm_recoverd tsutomu.owa
2017-08-09 16:18 ` David Teigland
2017-08-17 23:40 ` tsutomu.owa
2017-08-22 18:21 ` David Teigland [this message]
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=20170822182102.GA20358@redhat.com \
--to=teigland@redhat.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;
as well as URLs for NNTP newsgroup(s).