Re: [PATCH] printk: stop spining waiter when console resume to flush prb
From: Sergey Senozhatsky
Date: Mon May 10 2021 - 08:50:05 EST
On (21/05/10 12:32), John Ogness wrote:
> On 2021-05-10, Petr Mladek <pmladek@xxxxxxxx> wrote:
> > The current plan is to move console work to kthreads (separate
> > preemptive context). Using IRQ is a complete opposite way.
> >
> > There is always the fight between getting the messages out as soon
> > as possible and the risk of breaking the system (softlockups,
> > deadlocks).
> >
> > The kthread approach reduces the risk of system breakage to a bare
> > minimum. The price is that some messages might never reach console.
> > There is finally a consensus to give it a try. If it fails, we might
> > start looking for alternatives again.
>
> +1
>
> I think it is clear that any such fixups will disappear once
> atomic-consoles and console printing kthreads arrive.
Yes, hopefully.
> That doesn't mean we should ignore the fixups.
Well, that also doesn't mean that we should not discuss the fixups.
And there seems to be some sort of taboo on discussions.
> We just need to decide if it is a real problem that needs our
> immediate attention, thus warranting a fixup in the current implementation.
That's a good point.
> I can see the suspend/resume issue might be a real problem. If this
> should be addressed now, I would support Petr's patch, forcing the
> backlog to be printed in the preemptible resuming context. But let's
> just keep it a suspend/resume fixup. I do not think we want to start
> playing with how console_unlock() behaves.
And yes again. If console suspend/resume is a problem then something
superficially about suspend/resume can be done. System wide API that
makes printk behave either like "old" or like "new" one depending on
some flags is slightly opposite to "keep printk simple" intention. IMHO