Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: John Ogness <john.ogness@linutronix.de>
To: Petr Mladek <pmladek@suse.com>
Cc: Andrea Parri <parri.andrea@gmail.com>,
	Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
	Paul McKenney <paulmck@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
	Steven Rostedt <rostedt@goodmis.org>,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: [PATCH v5 0/4] printk: replace ringbuffer
Date: Thu,  9 Jul 2020 15:29:40 +0206	[thread overview]
Message-ID: <20200709132344.760-1-john.ogness@linutronix.de> (raw)

Hello,

Here is a v5 for the first series to rework the printk
subsystem. The v4 is here [0]. This first series
only replaces the existing ringbuffer implementation. No locking
is removed. The semantics/behavior of printk are kept the same
except for a minor optimization that is reverted (patch 3).

RFC patches for various userspace tools to dump the kernel log
are available: crash [1], makedumpfile [2], kexec-tools [3].

This series is based on v5.8-rc4.

The list of changes since v4:

printk_ringbuffer
=================

- added new prb_first_valid_seq() for readers to retrieve the
  oldest valid sequence number

- prb_first_seq(): now static

printk.c
========

- devkmsg_read(): fixed returning EPIPE on buffer wrap [4]

- setup_log_buf(): fixed printk conversion specifier [5]

- replace all prb_first_seq() usage with the new
  prb_first_valid_seq() (because that is what the readers are
  actually interested in)

[0] https://lkml.kernel.org/r/20200707145932.8752-1-john.ogness@linutronix.de
[1] https://github.com/Linutronix/crash.git (printk branch)
[2] https://github.com/Linutronix/makedumpfile.git (printk branch)
[3] https://github.com/Linutronix/kexec-tools.git (printk branch)
[4] https://lkml.kernel.org/r/87zh89kkek.fsf@jogness.linutronix.de
[5] https://lkml.kernel.org/r/87r1tmcfhf.fsf@jogness.linutronix.de

John Ogness (4):
  crash: add VMCOREINFO macro to define offset in a struct declared by
    typedef
  printk: add lockless ringbuffer
  Revert "printk: lock/unlock console only for new logbuf entries"
  printk: use the lockless ringbuffer

 include/linux/crash_core.h        |    3 +
 kernel/printk/Makefile            |    1 +
 kernel/printk/printk.c            |  950 ++++++++--------
 kernel/printk/printk_ringbuffer.c | 1687 +++++++++++++++++++++++++++++
 kernel/printk/printk_ringbuffer.h |  399 +++++++
 5 files changed, 2586 insertions(+), 454 deletions(-)
 create mode 100644 kernel/printk/printk_ringbuffer.c
 create mode 100644 kernel/printk/printk_ringbuffer.h

-- 
2.20.1


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

             reply	other threads:[~2020-07-09 13:23 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-09 13:23 John Ogness [this message]
2020-07-09 13:23 ` [PATCH v5 1/4] crash: add VMCOREINFO macro to define offset in a struct declared by typedef John Ogness
2020-07-09 13:23 ` [PATCH v5 2/4] printk: add lockless ringbuffer John Ogness
2020-07-10  8:43   ` Sergey Senozhatsky
2020-07-10  8:47     ` Sergey Senozhatsky
2020-07-09 13:23 ` [PATCH v5 3/4] Revert "printk: lock/unlock console only for new logbuf entries" John Ogness
2020-07-09 13:23 ` [PATCH v5 4/4] printk: use the lockless ringbuffer John Ogness
2020-07-14  5:26   ` [printk] 96d5c61b1f: stress-ng.timerfd.ops_per_sec 8.3% improvement kernel test robot
2020-07-18 12:10   ` [PATCH v5 4/4] printk: use the lockless ringbuffer Marco Elver
2020-07-19  3:43     ` Sergey Senozhatsky
2020-07-20  6:43       ` Marco Elver
2020-07-20  8:22         ` Andy Shevchenko
2020-07-20  8:34         ` Sergey Senozhatsky
2020-07-20  8:41         ` Sergey Senozhatsky
2020-07-20  9:40           ` Marco Elver
2020-07-20 10:01             ` Dmitry Vyukov
2020-07-20 10:20     ` John Ogness
2020-07-20 10:32       ` Marco Elver
2020-08-11 20:47   ` Nick Desaulniers
2020-08-12 16:40     ` John Ogness
2021-01-22 23:52   ` Issue in dmesg time with lockless ring buffer J. Avila
2021-01-25 13:32     ` John Ogness
2021-01-26  0:00       ` J. Avila
2021-01-29  1:46         ` J. Avila
2020-07-10  8:28 ` [PATCH v5 0/4] printk: replace ringbuffer Petr Mladek
2020-07-13  2:23   ` Sergey Senozhatsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200709132344.760-1-john.ogness@linutronix.de \
    --to=john.ogness@linutronix.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=parri.andrea@gmail.com \
    --cc=paulmck@kernel.org \
    --cc=peterz@infradead.org \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=sergey.senozhatsky.work@gmail.com \
    --cc=sergey.senozhatsky@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox