From: Peter Zijlstra <peterz@infradead.org>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: linux-kernel@vger.kernel.org, Oleg Nesterov <oleg@redhat.com>,
"Eric W . Biederman" <ebiederm@xmission.com>,
"Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
Andrew Morton <akpm@linux-foundation.org>,
Gavin Schenk <g.schenk@eckelmann.de>,
kernel@pengutronix.de
Subject: Re: [PATCH] RFC: siox: don't create a thread without starting it
Date: Tue, 26 Jun 2018 09:37:22 +0200 [thread overview]
Message-ID: <20180626073722.GX2458@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20180625192121.k3hx32xbbhqkyfu4@pengutronix.de>
On Mon, Jun 25, 2018 at 09:21:21PM +0200, Uwe Kleine-König wrote:
> > That said, irrespective of the whole UNINTERRUPTIBLE/IDLE thing, I find
> > this construct fairly fragile. We rely on not getting any spurious
> > wakeups without a 'special' state.
>
> Well, if the thread is woken up unintentionally nothing happens (apart
In your case sure. But people rely on the task being 'idle/blocked'
after kthread_create() to call things like kthread_bind() on it.
If it were to be woken early because dodgy games, the kthread_bind()
would fail, which in turn can lead to all sorts of 'fun' problems.
That is the whole point of this intermediate blocked state, it allows
you to muck with the kthread before it starts running custom code.
Arguably one could do it differently, but this is what it is.
next prev parent reply other threads:[~2018-06-26 7:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-25 10:20 Uwe Kleine-König
2018-06-25 12:51 ` Peter Zijlstra
2018-06-25 19:21 ` Uwe Kleine-König
2018-06-26 7:31 ` Peter Zijlstra
2018-06-28 7:57 ` [PATCH] " Uwe Kleine-König
2018-06-28 8:18 ` Uwe Kleine-König
2018-06-29 6:27 ` Schenk, Gavin
2018-06-29 7:38 ` Uwe Kleine-König
2018-07-01 23:34 ` Stephen Rothwell
2018-07-02 0:40 ` Stephen Rothwell
2018-07-02 6:49 ` Uwe Kleine-König
2018-06-26 7:37 ` Peter Zijlstra [this message]
2018-06-26 7:38 ` [PATCH] RFC: " Peter Zijlstra
2018-06-28 8:03 ` Uwe Kleine-König
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=20180626073722.GX2458@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=g.schenk@eckelmann.de \
--cc=kernel@pengutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=rafael.j.wysocki@intel.com \
--cc=u.kleine-koenig@pengutronix.de \
/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®