From: Andrew Morton <akpm@linux-foundation.org>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: linux-kernel@vger.kernel.org, oleg@redhat.com, atomlin@redhat.com
Subject: Re: [PATCH] kernel/hung_task.c: use timeout diff when timeout is updated
Date: Thu, 17 Dec 2015 14:18:05 -0800 [thread overview]
Message-ID: <20151217141805.f418cf9b137da08656504001@linux-foundation.org> (raw)
In-Reply-To: <201512172123.DFJ69220.SFFOLOJtVHOQMF@I-love.SAKURA.ne.jp>
On Thu, 17 Dec 2015 21:23:03 +0900 Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp> wrote:
> >From 529ff00b556e110c6e801c39e94b06f559307136 Mon Sep 17 00:00:00 2001
> From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> Date: Thu, 17 Dec 2015 16:27:08 +0900
> Subject: [PATCH] kernel/hung_task.c: use timeout diff when timeout is updated
>
> When new timeout is written to /proc/sys/kernel/hung_task_timeout_secs,
> khungtaskd is interrupted and again sleeps for full timeout duration.
>
> This means that hang task will not be checked if new timeout is written
> periodically within old timeout duration and/or checking of hang task
> will be delayed for up to previous timeout duration.
> Fix this by remembering last time khungtaskd checked hang task.
>
> This change will allow other watchdog tasks (if any) to share khungtaskd
> by sleeping for minimal timeout diff of all watchdog tasks. Doing more
> watchdog tasks from khungtaskd will reduce the possibility of printk()
> collisions by multiple watchdog threads.
This seems like reasonable behaviour, but it is a
non-backward-compatible change. I don't know how important that is -
probably "not very".
Please let's fully describe this behaviour in the documentation.
Documentation/sysctl/kernel.txt.
It appears that if userspace writes a new timeout which has already
expired, a check is triggered immediately, correct? Let's ensure that
this is documented as well. And tested!
And it would be helpful to add a comment to hung_timeout_jiffies()
which describes the behaviour and explains the reasons for it.
next prev parent reply other threads:[~2015-12-17 22:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-17 12:23 Tetsuo Handa
2015-12-17 22:18 ` Andrew Morton [this message]
2015-12-21 11:45 ` Tetsuo Handa
2015-12-21 21:45 ` Andrew Morton
2016-01-20 21:05 ` Andrew Morton
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=20151217141805.f418cf9b137da08656504001@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=atomlin@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=penguin-kernel@i-love.sakura.ne.jp \
/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®