On 2020/04/24 0:54, Sergey Senozhatsky wrote: > Hmm. Any chance that those NO_CONSOLE messages overflow logbuf so then > we start losing pending YES_CONSOLE messages? Of course there will be such possibility if printk() user is doing something close to while (1) { cond_resched(); printk("hello\n"); } which is not avoidable unless "we allocate huge logbuf" and/or "add a flow control on the caller side". My proposal was to keep printk() synchronous by offloading dump_tasks() to a deferrable context (i.e. a workqueue context) and adding a flow control so that "logbuf will not overflow", and Michal Hocko is still refusing on adding a flow control to dump_tasks() side. The possibility of overflowing logbuf will remain no matter how printk() changes (i.e. even asynchronous printk cannot solve). NO_CONSOLE is not only a way for suppress printing to consoles but also a way for reducing possibility of overflowing logbuf, by hoping that userspace syslog daemon can read logbuf quickly enough to make free space for future NO_CONSOLE/YES_CONSOLE messages.