[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aAoZbwEtkQ3gVl5d@pathway.suse.cz>
Date: Thu, 24 Apr 2025 12:58:55 +0200
From: Petr Mladek <pmladek@...e.com>
To: Sergey Senozhatsky <senozhatsky@...omium.org>
Cc: Ingo Molnar <mingo@...hat.com>, Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
Tomasz Figa <tfiga@...omium.org>,
John Ogness <john.ogness@...utronix.de>,
Steven Rostedt <rostedt@...dmis.org>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] hung_task: configurable hung-task stacktrace loglevel
On Thu 2025-04-24 16:02:43, Sergey Senozhatsky wrote:
> Currently, hung-task watchdog uses two different loglevels
> to report hung-tasks: a) KERN_INFO for all the important task
> information (e.g. sched_show_task()) and b) KERN_ERR for the
> rest.
IMHO, the two different loglevels make sense. The KERN_ERR
message seems to inform about that a task gets blocked for too long.
And KERN_INFO is used for an extra debug information.
> This makes it a little inconvenient, especially for
> automated kernel logs parsing.
Anyway, what is the exact problem, please?
Are the KERN_INFO messages filtered because of console_loglevel?
Or is it a problem to match all the related lines?
> Introduce CONFIG_HUNG_TASK_STACKTRACE_LOGLEVEL so that (a)
> becomes configurable.
I am not sure if adding hung-task-specific config option is
the right solution. I guess that other watchdogs or other
similar reports have the same problem.
It seems that several other reports, for example,
watchdog_hardlockup_check(), or __die(), are using KERN_DEFAULT
which is configurable via CONFIG_MESSAGE_LOGLEVEL_DEFAULT.
A solution might be using KERN_DEFAULT for sched_show_task()
in hung_tasks detector as well.
Alternatively, if the problem is console_loglevel filtering then
it might make sense to create a config option which would force
using the same loglevel in all similar reports. I would call it:
CONFIG_FULL_REPORT_USING_SAME_LOGLEVEL
And support it for other reports.
If the problem is matching all related lines. Then a solution
would be printing some help lines around the report, similar
to
------------[ cut here ]------------
in include/asm-generic/bug.h
Plus, it would be needed to filter out messages from other CPUs.
CONFIG_PRINTK_CALLER should help with this.
Best Regards,
Petr
Powered by blists - more mailing lists