From: Oleg Nesterov <oleg@redhat•com>
To: Petr Mladek <pmladek@suse•com>
Cc: Miroslav Benes <mbenes@suse•cz>,
jpoimboe@redhat•com, jeyu@kernel•org, jikos@kernel•org,
lpechacek@suse•cz, pavel@ucw•cz, live-patching@vger•kernel.org,
linux-kernel@vger•kernel.org,
Michael Ellerman <mpe@ellerman•id.au>,
Thomas Gleixner <tglx@linutronix•de>,
Ingo Molnar <mingo@redhat•com>, "H. Peter Anvin" <hpa@zytor•com>,
Andy Lutomirski <luto@kernel•org>,
linuxppc-dev@lists•ozlabs.org, x86@kernel•org
Subject: Re: [PATCH v3 1/2] livepatch: send a fake signal to all blocking tasks
Date: Wed, 1 Nov 2017 17:43:14 +0100 [thread overview]
Message-ID: <20171101164314.GA32760@redhat.com> (raw)
In-Reply-To: <20171101151355.GG20040@pathway.suse.cz>
On 11/01, Petr Mladek wrote:
>
> On Tue 2017-10-31 12:48:52, Miroslav Benes wrote:
> > + if (task->flags & PF_KTHREAD) {
> > + /*
> > + * Wake up a kthread which still has not been migrated.
> > + */
> > + wake_up_process(task);
>
> I have just noticed that freezer used wake_up_state(p, TASK_INTERRUPTIBLE);
> IMHO, we should do so as well.
I won't argue, but...
> wake_up_process() wakes also tasks in TASK_UNINTERRUPTIBLE state.
> These might not be ready for an unexpected wakeup. For example,
> see concat_dev_erase() in drivers/mtd/mtdcontact.c.
I'd say that concat_dev_erase() should be fixed, any code should be ready
for spurious wakeup.
Note also that wake_up_state(TASK_INTERRUPTIBLE) won't wakeup the TASK_IDLE
kthreads, and most of the kthreads which use TASK_INTERRUPTIBLE should use
TASK_IDLE today, because in most cases TASK_INTERRUPTIBLE was used to not
contribute to loadavg.
Oleg.
next prev parent reply other threads:[~2017-11-01 16:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20171031114853.841-1-mbenes@suse.cz>
2017-10-31 11:48 ` [PATCH v3 1/2] livepatch: send a fake signal to all blocking tasks Miroslav Benes
2017-11-01 15:06 ` Miroslav Benes
2017-11-01 15:13 ` Petr Mladek
2017-11-01 16:43 ` Oleg Nesterov [this message]
2017-11-02 10:36 ` Miroslav Benes
2017-11-02 14:08 ` Oleg Nesterov
2017-11-02 13:09 ` Josh Poimboeuf
2017-11-03 8:02 ` Miroslav Benes
2017-11-03 12:57 ` Josh Poimboeuf
2017-11-02 13:32 ` Josh Poimboeuf
2017-11-03 8:06 ` Miroslav Benes
2017-11-06 11:08 ` Pavel Machek
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=20171101164314.GA32760@redhat.com \
--to=oleg@redhat$(echo .)com \
--cc=hpa@zytor$(echo .)com \
--cc=jeyu@kernel$(echo .)org \
--cc=jikos@kernel$(echo .)org \
--cc=jpoimboe@redhat$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=live-patching@vger$(echo .)kernel.org \
--cc=lpechacek@suse$(echo .)cz \
--cc=luto@kernel$(echo .)org \
--cc=mbenes@suse$(echo .)cz \
--cc=mingo@redhat$(echo .)com \
--cc=mpe@ellerman$(echo .)id.au \
--cc=pavel@ucw$(echo .)cz \
--cc=pmladek@suse$(echo .)com \
--cc=tglx@linutronix$(echo .)de \
--cc=x86@kernel$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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