On Fri 2022-02-18 09:00:46, David Laight wrote: > > On Mon 2022-02-07 20:49:19, John Ogness wrote: > > > Once kthread printing is introduced, console printing will no longer > > > occur in the context of the printk caller. However, there are some > > > special contexts where it is desirable for the printk caller to > > > directly print out kernel messages. > > Yes - most of them. > > It is going to be pretty impossible to do 'hard' kernel debugging > if printk get deferred. What do you exactly mean by 'hard' kernel debugging, please? What exactly won't be possible, please? It is really important to talk about real scenarios because we do our best to address them. This patchset disables the deferred console handling in several situations, especially during panic, reboot, kexec. The consoles are flushed during suspend, etc. The patchset solves real problems, soft and live-lockups and even deadlocks. It will actually allow debugging when too many messages caused softlockups and the system died. I saw it many times during boot of systems with many network interfaces or disks. Backtraces from all CPUs and processes, detailed Oops reports, and similar extensive output was able to kill the system. In each case, the legacy "direct" mode will still be around. > Typically there already is a deferral method. > The prints aren't done by the kernel, but by syslogd. syslogd helps only when userspace works and the messages can be stored on a filesystems. And it is perfectly fine and much more safe to defer consoles most of the time. I have seen many reports where consoles put the system into knees. And sometime printk() was the root of all problems. Best Regards, Petr