Messages in this thread | | | Date | Fri, 12 Nov 2021 09:45:15 +0100 | From | Petr Mladek <> | Subject | Re: [PATCH v2 1/1] printk: suppress rcu stall warnings caused by slow console devices |
| |
On Thu 2021-11-11 16:59:04, Wander Lairson Costa wrote: > If we have a reasonable large dataset to flush in the printk ring > buffer in the presence of a slow console device (like a serial port > with a low baud rate configured), the RCU stall detector may report > warnings. > > This patch suppresses RCU stall warnings while flushing the ring buffer > to the console.
I have mixed feelings about this patch.
We already touch watchdogs in several situations to avoid this type of reports. So, there is a precedent.
On the other hand, it hides a real problem. printk() might cause softlockups, livelockups, and even deadlocks. It might really stall other processes and CPUs. And the stall report might help to understand that the system is not longer responsive because of printk().
John Ogness is working on the proper solution, handling consoles in a kthread. It is not that easy because we need to handle situations when kthreads do not work, for example, during early boot, panic(), suspend, reboot, kexec. But I believe that we will have it rather sooner than later.
A workaround, is to lower console_loglevel and show only the most important messages. Sometimes, a reasonable solution is to ratelimit repeated messages.
Which brings the question. What is the motivation for this patch, please?
Is it motivated by a particular bug report? Or does the experience shows that this report causes more harm than good?
Best Regards, Petr
| |