]> git.ipfire.org Git - thirdparty/linux.git/commit
printk: Introduce console_flush_one_record
authorAndrew Murray <amurray@thegoodpenguin.co.uk>
Mon, 20 Oct 2025 15:38:05 +0000 (16:38 +0100)
committerPetr Mladek <pmladek@suse.com>
Thu, 23 Oct 2025 15:08:41 +0000 (17:08 +0200)
commit741ea7aa95dd9ac77f861e7d0961d8d231ac8448
treed03321334bbcde1511f5ee85bb8f8c1643182021
parent48e3694ae7fae347c1193c84f384f4ea41086075
printk: Introduce console_flush_one_record

console_flush_all prints all remaining records to all usable consoles
whilst its caller holds console_lock. This can result in large waiting
times for those waiting for console_lock especially where there is a
large volume of records or where the console is slow (e.g. serial).

Let's extract the parts of this function which print a single record
into a new function named console_flush_one_record. This can later
be used for functions that will release and reacquire console_lock
between records.

This commit should not change existing functionality.

Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Andrew Murray <amurray@thegoodpenguin.co.uk>
Reviewed-by: John Ogness <john.ogness@linutronix.de>
Link: https://patch.msgid.link/20251020-printk_legacy_thread_console_lock-v3-1-00f1f0ac055a@thegoodpenguin.co.uk
Signed-off-by: Petr Mladek <pmladek@suse.com>
kernel/printk/printk.c