printk: remove logbuf_lock
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest14 patches 28 repliesIn review
Changes since v1 from the cover letter
- handle the syslog_print_all() size calculation issue in a separate patch (patch 1)
- use a local printk_info for find_first_fitting_seq()
- define CONSOLE_LOG_MAX in printk.c instead of printk.h since it is not used outside of printk.c
- increase CONSOLE_LOG_MAX to 4096 to support long multi-line records
- add a wrapper function read_syslog_seq_irq() for getting a consistent @syslog_seq value (only used in do_syslog())
- drop the "hv: synchronize kmsg_dumper" patch
- in "remove logbuf_lock" only change to safe buffer usage
- fixup safe buffer usage and redundance in separate patches (patches 13 and 14)
- update comments and commit messages as requested
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/14 | printk: limit second loop of syslog_print_allkernel/ | +8 | 1 reply | |
| 2/14 | printk: kmsg_dump: remove unused fieldsinclude/ | +3 | 1 reply | |
| 3/14 | printk: refactor kmsg_dump_get_buffer()include/ kernel/ | +33 | 0 replies | |
| 4/14 | printk: consolidate kmsg_dump_get_buffer/syslog_print_all codekernel/ | +50 | 1 reply | |
| 5/14 | printk: introduce CONSOLE_LOG_MAX for improved multi-line supportkernel/ | +11 | 1 reply | |
| 6/14 | printk: use seqcount_latch for clear_seqkernel/ | +50 | 0 replies | |
| 7/14 | printk: use atomic64_t for devkmsg_user.seqkernel/ | +12 | 1 reply | |
| 8/14 | printk: add syslog_lockkernel/ | +37 | 11 replies | |
| 9/14 | printk: introduce a kmsg_dump iteratorarch/ arch/ arch/ +7 more | +84 | 8 replies | |
| 10/14 | um: synchronize kmsg_dumperarch/ | +8 | 0 replies | |
| 11/14 | printk: remove logbuf_lockkernel/ kernel/ kernel/ | +47 | 1 reply | |
| 12/14 | printk: kmsg_dump: remove _nolock() variantsarch/ include/ kernel/ +1 more | +15 | 1 reply | |
| 13/14 | printk: kmsg_dump: use kmsg_dump_rewindkernel/ | +1 | 1 reply | |
| 14/14 | printk: console: remove unnecessary safe buffer usagekernel/ | +3 | 1 reply |
Reviews trailers per patch
13 of 14 patches have a Reviewed-by or Acked-by.
| Patch | Petr Mladek | Michael Kelley |
|---|---|---|
| 1/14 | R-b | |
| 2/14 | R-b | |
| 3/14 | R-b | |
| 4/14 | R-b | |
| 5/14 | R-b | |
| 6/14 | R-b | |
| 7/14 | R-b | |
| 8/14 | ||
| 9/14 | R-b | R-b |
| 10/14 | R-b | |
| 11/14 | R-b | |
| 12/14 | R-b | |
| 13/14 | R-b | |
| 14/14 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH printk-rework 00/14] printk: remove logbuf_lock
Hello,
Here is v2 of a series to remove @logbuf_lock, exposing the ringbuffer locklessly to both readers and writers. v1 is here [0].
Since @logbuf_lock was protecting much more than just the ringbuffer, this series clarifies and cleans up the various protections using comments, lockless accessors, atomic types, and a new finer-grained @syslog_log.
Changes since v1:
- handle the syslog_print_all() size calculation issue in a separate patch (patch 1)
- use a local printk_info for find_first_fitting_seq()
- define CONSOLE_LOG_MAX in printk.c instead of printk.h since it is not used outside of printk.c
- increase CONSOLE_LOG_MAX to 4096 to support long multi-line records
- add a wrapper function read_syslog_seq_irq() for getting a consistent @syslog_seq value (only used in do_syslog())
- drop the "hv: synchronize kmsg_dumper" patch
- in "remove logbuf_lock" only change to safe buffer usage
- fixup safe buffer usage and redundance in separate patches (patches 13 and 14)
- update comments and commit messages as requested
John Ogness
[0] https://lkml.kernel.org/r/[email protected]
John Ogness (14):
printk: limit second loop of syslog_print_all
printk: kmsg_dump: remove unused fields
printk: refactor kmsg_dump_get_buffer()
printk: consolidate kmsg_dump_get_buffer/syslog_print_all code
printk: introduce CONSOLE_LOG_MAX for improved multi-line support
printk: use seqcount_latch for clear_seq
printk: use atomic64_t for devkmsg_user.seq
printk: add syslog_lock
printk: introduce a kmsg_dump iterator
um: synchronize kmsg_dumper
printk: remove logbuf_lock
printk: kmsg_dump: remove _nolock() variants
printk: kmsg_dump: use kmsg_dump_rewind
printk: console: remove unnecessary safe buffer usage
arch/powerpc/kernel/nvram_64.c | 12 +- arch/powerpc/platforms/powernv/opal-kmsg.c | 3 +- arch/powerpc/xmon/xmon.c | 6 +- arch/um/kernel/kmsg_dump.c | 13 +- drivers/hv/vmbus_drv.c | 5 +- drivers/mtd/mtdoops.c | 5 +- fs/pstore/platform.c | 5 +- include/linux/kmsg_dump.h | 52 +-- kernel/debug/kdb/kdb_main.c | 10 +- kernel/printk/internal.h | 4 +- kernel/printk/printk.c | 454 +++++++++++---------- kernel/printk/printk_safe.c | 29 +- 12 files changed, 298 insertions(+), 300 deletions(-)
Signature · 1 line
2.20.1