Re: [PATCH] kernel/hung_task.c: allow to set period separately from timeout

From: Dmitry Vyukov
Date: Mon Jun 11 2018 - 09:17:00 EST

On Mon, Jun 11, 2018 at 2:48 PM, Tetsuo Handa
<penguin-kernel@xxxxxxxxxxxxxxxxxxx> wrote:
> On 2018/06/11 20:16, Dmitry Vyukov wrote:
>>> timeout = 60 and period = 1 would allow hung task to be reported as soon
>>> as it remained uninterruptible for 60 seconds. That makes me easier to
>>> narrow down relevant kernel messages and syzbot program.
>>> Well, showing exact slept time, along with all threads which slept more
>>> than some threshold (e.g. timeout / 2), might be helpful.
>> You mean if we report any task, then scan all tasks second time and
>> additionally report tasks that are blocked for (timeout/2 : timeout)?
> Yes. Something like check_memalloc_stalling_tasks() in
> .
>> Should we do this when hung_task_show_lock? Or only when
>> sysctl_hung_task_panic? Or when?
> I think always is more useful. That is, first round only checks whether
> there is at least one stalling task, and second round reports stalling tasks
> if at least one task is stalling.

Agree that it would be useful. But can't promise to work on this soon.