Re: [PATCH 2/2] printk: Make the console flush configurable in hotplug path

From: Greg KH
Date: Fri Sep 25 2020 - 05:27:42 EST


On Thu, Sep 24, 2020 at 08:21:07PM +0200, Thomas Gleixner wrote:
> On Thu, Sep 24 2020 at 08:33, Greg KH wrote:
> > On Wed, Sep 23, 2020 at 05:08:32PM -0700, Prasad Sodagudi wrote:
> >> +config CONSOLE_FLUSH_ON_HOTPLUG
> >> + bool "Enable console flush configurable in hot plug code path"
> >> + depends on HOTPLUG_CPU
> >> + def_bool n
> >
> > n is the default, no need to list it.
> >
> >> + help
> >> + In cpu hot plug path console lock acquire and release causes the
> >> + console to flush. If console lock is not free hot plug latency
> >> + increases. So make console flush configurable in hot plug path
> >> + and default disabled to help in cpu hot plug latencies.
> >
> > Why would you not want this option?
> >
> > Why isn't this just a bugfix?
>
> Because it's the normal behaviour of console lock and there are
> gazillion other ways to delay stuff in the hotplug path.
>
> CPU hotplug is not meant to be a high speed operation and if people
> think they need it to be fast then its pretty much guaranteed that they
> want it for the completely wrong reasons.

Odds are, it's the big/little systems that are trying to use cpu hotplug
for this type of thing :(

> This #ifdef tinkering is just digusting especially as it just tackles an
> obvious way how to delay timer migration, but does not address the
> underlying root cause.

Agreed, thanks for putting it better than I did.

greg k-h