mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Petr Mladek <pmladek@suse.com>
To: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
	Tomasz Figa <tfiga@chromium.org>,
	John Ogness <john.ogness@linutronix.de>,
	Steven Rostedt <rostedt@goodmis.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] hung_task: configurable hung-task stacktrace loglevel
Date: Thu, 24 Apr 2025 12:58:55 +0200	[thread overview]
Message-ID: <aAoZbwEtkQ3gVl5d@pathway.suse.cz> (raw)
In-Reply-To: <20250424070436.2380215-1-senozhatsky@chromium.org>

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

  reply	other threads:[~2025-04-24 10:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-24  7:02 Sergey Senozhatsky
2025-04-24 10:58 ` Petr Mladek [this message]
2025-04-25  4:49   ` Sergey Senozhatsky
2025-04-25 14:55     ` Petr Mladek
2025-04-30  1:34       ` Sergey Senozhatsky
2025-04-30  1:57         ` Sergey Senozhatsky
2025-04-25  6:58   ` Tomasz Figa
2025-04-25 15:32     ` Petr Mladek
2025-04-28  8:05       ` John Ogness
2025-04-30  5:05         ` Sergey Senozhatsky
2025-04-30  8:42       ` Tomasz Figa
2025-05-02 15:05         ` Petr Mladek
2025-05-02 15:30           ` John Ogness

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=aAoZbwEtkQ3gVl5d@pathway.suse.cz \
    --to=pmladek@suse.com \
    --cc=akpm@linux-foundation.org \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=john.ogness@linutronix.de \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=senozhatsky@chromium.org \
    --cc=tfiga@chromium.org \
    --cc=vincent.guittot@linaro.org \
    /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®