linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH printk 0/5] printk: remove logbuf_lock
@ 2020-09-22 15:38 John Ogness
  2020-09-22 15:38 ` [PATCH printk 1/5] printk: get new seq before enabling interrupts John Ogness
                   ` (4 more replies)
  0 siblings, 5 replies; 37+ messages in thread
From: John Ogness @ 2020-09-22 15:38 UTC (permalink / raw)
  To: Petr Mladek
  Cc: Sergey Senozhatsky, Sergey Senozhatsky, Steven Rostedt,
	Linus Torvalds, Greg Kroah-Hartman, Thomas Gleixner,
	linux-kernel

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


^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2020-10-01  7:58 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-22 15:38 [PATCH printk 0/5] printk: remove logbuf_lock John Ogness
2020-09-22 15:38 ` [PATCH printk 1/5] printk: get new seq before enabling interrupts John Ogness
2020-09-23 14:17   ` Petr Mladek
2020-09-23 14:36     ` John Ogness
2020-09-22 15:38 ` [PATCH printk 2/5] printk: kmsg_dump_rewind_nolock: start from first record John Ogness
2020-09-23 14:52   ` Petr Mladek
2020-09-23 15:39     ` John Ogness
2020-09-22 15:38 ` [PATCH printk 3/5] printk: use buffer pool for sprint buffers John Ogness
2020-09-23 15:11   ` Petr Mladek
2020-09-23 15:21     ` David Laight
2020-09-23 16:41       ` Petr Mladek
2020-09-24  5:40     ` Sergey Senozhatsky
2020-09-24  8:45       ` Petr Mladek
2020-09-24  8:53         ` Sergey Senozhatsky
2020-09-24  9:49           ` Rasmus Villemoes
2020-09-25  8:15             ` Petr Mladek
2020-09-24  9:54     ` Rasmus Villemoes
2020-09-24 12:32       ` Rasmus Villemoes
2020-09-25  8:28         ` Petr Mladek
2020-09-30  8:06           ` Rasmus Villemoes
2020-09-30  8:51             ` Petr Mladek
2020-09-30  8:57               ` John Ogness
2020-09-30 13:35             ` Steven Rostedt
2020-09-30 14:32               ` David Laight
2020-10-01  7:15               ` Rasmus Villemoes
2020-10-01  7:58                 ` Petr Mladek
2020-09-24  1:21   ` Sergey Senozhatsky
2020-09-24  6:17   ` Sergey Senozhatsky
2020-09-24  8:54     ` Petr Mladek
2020-09-24  9:06       ` Sergey Senozhatsky
2020-09-25  8:13         ` Petr Mladek
2020-09-22 15:38 ` [PATCH printk 4/5] printk: remove logbuf_lock, add syslog_lock John Ogness
2020-09-23 16:30   ` Petr Mladek
2020-09-24  8:45   ` Sergey Senozhatsky
2020-09-24  9:21     ` John Ogness
2020-09-22 15:38 ` [PATCH printk 5/5] printk: remove nmi safe buffers John Ogness
2020-09-23 16:36   ` Petr Mladek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).