[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20151217141805.f418cf9b137da08656504001@linux-foundation.org>
Date: Thu, 17 Dec 2015 14:18:05 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
Cc: linux-kernel@...r.kernel.org, oleg@...hat.com, atomlin@...hat.com
Subject: Re: [PATCH] kernel/hung_task.c: use timeout diff when timeout is
updated
On Thu, 17 Dec 2015 21:23:03 +0900 Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp> wrote:
> >From 529ff00b556e110c6e801c39e94b06f559307136 Mon Sep 17 00:00:00 2001
> From: Tetsuo Handa <penguin-kernel@...ove.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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists