]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
Documentation: printk: Add section about avoiding lockups
authorh3288824963 <3288824963@qq.com>
Tue, 17 Mar 2026 10:57:11 +0000 (18:57 +0800)
committerJonathan Corbet <corbet@lwn.net>
Tue, 17 Mar 2026 14:37:49 +0000 (08:37 -0600)
commit04c612f6d7641dc563e8aac95649be6c888ba7db
treed55fd3170bad5ae2b5c261bd00eeeeccbff6efba
parent5e6df46dffb32342c4be6deb6f897363f207bf05
Documentation: printk: Add section about avoiding lockups

Add a section 'Avoiding lockups from excessive printk() use' to
printk-basics.rst, explaining the risk of calling printk() in hot paths
with legacy consoles and suggesting alternatives.

The section covers:
- Rate-limited and one-time printing variants
- Log level filtering
- printk_deferred() for legacy consoles
- Porting to nbcon API (preferred solution)
- Using tracepoints for permanent debugging

This documentation is relevant only for legacy console drivers and
!PREEMPT_RT kernels.

Suggested-by: Petr Mladek <pmladek@suse.com>
Suggested-by: John Ogness <john.ogness@linutronix.de>
Signed-off-by: h3288824963 <3288824963@qq.com>
Reviewed-by: John Ogness <john.ogness@linutronix.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <tencent_FB5B7DCFFB10BCDE325397D1202226779D09@qq.com>
Documentation/core-api/printk-basics.rst