LKML Archive on
help / color / mirror / Atom feed
From: Petr Mladek <>
Cc: Thomas Gleixner <>,
	Greg KH <>,,,,,
	Mohammed Khajapasha <>
Subject: Re: [PATCH 2/2] printk: Make the console flush configurable in hotplug path
Date: Wed, 30 Sep 2020 16:36:35 +0200	[thread overview]
Message-ID: <20200930143635.GJ29288@alley> (raw)
In-Reply-To: <>

On Sun 2020-09-27 19:05:34, wrote:
> Yes. I agree with you that there are other conditions, which could delay the
> hotplug operation. But this console
> flushing is not needed in the hotplug path.  In the hotplug path, a core is
> trying printing messages
> from other core(by design of printk), delays the whole hotplug operation and
> timers migration.  As timers
> migration gets delayed, it would impact the systems stability in device
> stability testing.
> To avoid timers delay in the timer migration in  debug builds has to choose
> this option.

Again, just from the printk() point of view. The current printk()
design is that it tries to flush the messages to the console
immediately. It increases the chance to see them. The price is
that printk() might delay the code a lot.

Console handled in a dedicated kthread might make printk() fast. But
there might be another problem. Messages might get lost when they
generated faster than they might be shown on slow consoles.

In both cases, you need to think twice whether you really want to
print the messages at all or if you really want to show them on
slow consoles, see console_loglevel.

Also keep in mind that testing is not real life. I believe that
kernel messages are not shown on slow consoles on production devices.

That said, it seems that printk() is not the real problem here. As
others suggest, CPU hotplug is not the right solution for the usecase.

Best Regards,

  parent reply	other threads:[~2020-09-30 14:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-24  0:08 [PATCH 1/2] genirq/cpuhotplug: Reduce logging level for couple of prints Prasad Sodagudi
2020-09-24  0:08 ` [PATCH 2/2] printk: Make the console flush configurable in hotplug path Prasad Sodagudi
2020-09-24  6:33   ` Greg KH
2020-09-24 18:21     ` Thomas Gleixner
2020-09-25  9:27       ` Greg KH
2020-09-25 14:16         ` Adam Borowski
2020-09-25 22:55           ` Thomas Gleixner
2020-09-28  2:05       ` psodagud
2020-09-28 12:50         ` Greg KH
2020-09-30 14:36         ` Petr Mladek [this message]
2020-09-24  6:38   ` Sergey Senozhatsky
2020-09-30 13:57   ` Petr Mladek
2020-09-24  6:31 ` [PATCH 1/2] genirq/cpuhotplug: Reduce logging level for couple of prints Greg KH
2020-09-24 18:08 ` Thomas Gleixner

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200930143635.GJ29288@alley \ \ \ \ \ \ \ \ \ \
    --subject='Re: [PATCH 2/2] printk: Make the console flush configurable in hotplug path' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).