Messages in this thread | | | From | John Ogness <> | Subject | [PATCH printk 0/5] printk: remove logbuf_lock | Date | Tue, 22 Sep 2020 17:44:11 +0206 |
| |
Hello,
Here is the next series for the printk-rework to remove @logbuf_lock. Since this lock protected more than just the ringbuffer, a new finer-grained @syslog_lock is introduced.
With this series, vprintk_store() is lockless.
A consequence of this locklessness is that a different method for using temporary sprint space was needed. A DIY memory buffer pool has been implemented for this. Since printk is used before per-cpu variables are available, I felt that this was the simplest approach. Feel free to throw tomatoes at me if another approach should be taken. (And please suggest that other approach.)
Also as a consequence of a lockless vprintk_store() is that there is no longer a need for the NMI safe buffers. They are also removed. The safe buffers for printk recursion are still used.
This series falls in line with the printk-rework plan as presented [0] at Linux Plumbers in Lisbon 2019.
The series is based on the printk-rework branch of the printk git tree:
f35efc78add6 ("printk: remove dict ring")
John Ogness
[0] https://linuxplumbersconf.org/event/4/contributions/290/attachments/276/463/lpc2019_jogness_printk.pdf (slide 23)
John Ogness (5): printk: get new seq before enabling interrupts printk: kmsg_dump_rewind_nolock: start from first record printk: use buffer pool for sprint buffers printk: remove logbuf_lock, add syslog_lock printk: remove nmi safe buffers
kernel/printk/internal.h | 4 +- kernel/printk/printk.c | 320 ++++++++++++++++++++++++------------ kernel/printk/printk_safe.c | 64 +------- 3 files changed, 218 insertions(+), 170 deletions(-)
-- 2.20.1
| |