All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Mladek <pmladek@suse.com>
To: John Ogness <john.ogness@linutronix.de>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH printk v5 7/8] printk: use printk_buffers for devkmsg
Date: Mon, 9 Jan 2023 15:23:39 +0100	[thread overview]
Message-ID: <Y7wja2TrMrT4qGyU@alley> (raw)
In-Reply-To: <20230109100800.1085541-8-john.ogness@linutronix.de>

On Mon 2023-01-09 11:13:59, John Ogness wrote:
> Replace the buffers in struct devkmsg_user with a struct
> printk_buffers. This reduces the number of buffers to keep track of.
> 
> As a side-effect, @text_buf was 8kB large, even though it only
> needed to be the max size of a ringbuffer record. By switching to
> struct printk_buffers, ~7kB less memory is allocated when opening
> /dev/kmsg.
> 
> And since struct printk_buffers will be used now, reduce duplicate
> code by calling printk_get_next_message() to handle the record
> reading and formatting.
> 
> Note that since /dev/kmsg never suppresses records based on
> loglevel, printk_get_next_message() is extended with an extra
> bool argument to specify if suppression is allowed.
> 
> Signed-off-by: John Ogness <john.ogness@linutronix.de>

Reviewed-by: Petr Mladek <pmladek@suse.com>

Best Regards,
Petr

  reply	other threads:[~2023-01-09 14:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-09 10:07 [PATCH printk v5 0/8] printk: cleanup buffer handling John Ogness
2023-01-09 10:07 ` [PATCH printk v5 1/8] printk: move size limit macros into internal.h John Ogness
2023-01-09 10:07 ` [PATCH printk v5 2/8] console: Use BIT() macros for @flags values John Ogness
2023-01-09 10:07 ` [PATCH printk v5 3/8] console: Document struct console John Ogness
2023-01-09 10:07 ` [PATCH printk v5 4/8] printk: introduce struct printk_buffers John Ogness
2023-01-09 10:07 ` [PATCH printk v5 5/8] printk: introduce printk_get_next_message() and printk_message John Ogness
2023-01-09 10:07 ` [PATCH printk v5 6/8] printk: introduce console_prepend_dropped() for dropped messages John Ogness
2023-01-09 14:12   ` Petr Mladek
2023-01-09 10:07 ` [PATCH printk v5 7/8] printk: use printk_buffers for devkmsg John Ogness
2023-01-09 14:23   ` Petr Mladek [this message]
2023-01-09 10:08 ` [PATCH printk v5 8/8] printk: adjust string limit macros John Ogness
2023-01-09 15:10 ` [PATCH printk v5 0/8] printk: cleanup buffer handling Petr Mladek
2023-01-11 15:36   ` Petr Mladek

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=Y7wja2TrMrT4qGyU@alley \
    --to=pmladek@suse.com \
    --cc=john.ogness@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=senozhatsky@chromium.org \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.