mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Schenk, Gavin" <G.Schenk@eckelmann.de>
To: "u.kleine-koenig@pengutronix.de" <u.kleine-koenig@pengutronix.de>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"peterz@infradead.org" <peterz@infradead.org>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>
Subject: Re: [PATCH] siox: don't create a thread without starting it
Date: Fri, 29 Jun 2018 06:27:22 +0000	[thread overview]
Message-ID: <5c1f29b492420c62404edd72fe10af94b3e113d0.camel@eckelmann.de> (raw)
In-Reply-To: <20180628075742.8991-1-u.kleine-koenig@pengutronix.de>

On Thu, 2018-06-28 at 09:57 +0200, Uwe Kleine-König wrote:
> When a siox master device is registered a kthread is created that is
> only started when triggered by userspace. So this thread might be in
> TASK_UNINTERRUPTIBLE state for long and trigger a warning
> 
> 	[  241.130465] INFO: task siox-0:626 blocked for more than 120 seconds.
> 
> with the respective debug settings enabled. It might be right to put an
> unstarted thread to TASK_IDLE (in kernel/kthread.c:kthread()) instead,
> but independant of this discussion it is cleaner for
> siox_master_register() to start the thread immediately. The effect is
> that it enters its own waiting state and then stays in state TASK_IDLE
> which doesn't trigger the above warning.
> 
> As siox_poll_thread() uses some variables of the device the
> initialisation of these is moved before thread creation.
> 
> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
Acked-by: Gavin Schenk <g.schenk@eckelmann.de

I tested that this warning is gone with this patch.

Regards
Gavin Schenk

  parent reply	other threads:[~2018-06-29  6:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-25 10:20 [PATCH] RFC: " 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 [this message]
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     ` [PATCH] RFC: " Peter Zijlstra
2018-06-26  7:38     ` 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=5c1f29b492420c62404edd72fe10af94b3e113d0.camel@eckelmann.de \
    --to=g.schenk@eckelmann.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --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®