mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Ogness <john.ogness@linutronix.de>
To: Geert Uytterhoeven <geert@linux-m68k.org>,
	Petr Mladek <pmladek@suse.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Peter Zijlstra <peterz@infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Daniel Thompson <daniel.thompson@linaro.org>
Subject: Re: [GIT PULL] printk for 5.10 (includes lockless ringbuffer)
Date: Wed, 14 Oct 2020 23:01:30 +0206	[thread overview]
Message-ID: <87lfg85xz1.fsf@jogness.linutronix.de> (raw)
In-Reply-To: <CAMuHMdXHFFUrjRMEHnXXU8QQkgD9x_S6R3N0Q7Q4H2RSfy2GGw@mail.gmail.com>

On 2020-10-14, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>> - Fully lockless ringbuffer implementation, including the support for
>>   continuous lines. It will allow to store and read messages in any
>>   situation wihtout the risk of deadlocks and without the need
>>   of temporary per-CPU buffers.
>
>     linux-m68k-atari_defconfig$ bloat-o-meter vmlinux.old vmlinux.lockless_ringbuffer
>     add/remove: 39/16 grow/shrink: 9/15 up/down: 214075/-4362 (209713)
>     Function                                     old     new   delta
>     _printk_rb_static_infos                        -  180224 +180224
>     _printk_rb_static_descs                        -   24576  +24576

131072 of _printk_rb_static_infos is reserved for dictionary usage. The
rest (49152) is for the record meta data. Previously any dictionary
usage and record meta data was embedded in the message buffer (log_buf,
65536).

Since the meta data is now separate, setting CONFIG_LOG_BUF_SHIFT=15
would provide roughly the same amount of record storage as
CONFIG_LOG_BUF_SHIFT=16 did with vmlinux.old. Then there would be:

32768: message buffer
24576: meta data
65536: dictionary data
12288: descriptor data

Excluding the dictionary data, the total is 65536.

(With vmlinux.old there is 65536 total with CONFIG_LOG_BUF_SHIFT=16.)

It is the reserved dictionary data that is hurting us here.

Should we provide a config option to kill the dictionary data?

Should CONFIG_LOG_BUF_SHIFT do an implicit -1 so that the sizes (without
dictionary data) are about the same as before?

Maybe dictionaries should only exist in the dynamically allocated
ringbuffer?

John Ogness

  parent reply	other threads:[~2020-10-15  1:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-12 14:49 Petr Mladek
2020-10-13 23:49 ` pr-tracker-bot
2020-10-14 14:16 ` Geert Uytterhoeven
2020-10-14 14:58   ` Rasmus Villemoes
2020-10-14 15:07     ` Geert Uytterhoeven
2020-10-15  8:03     ` Petr Mladek
2020-10-14 20:55   ` John Ogness [this message]
2020-10-15  7:52     ` Petr Mladek
2020-10-16 15:05 Petr Mladek
2020-10-16 19:54 ` pr-tracker-bot
2020-11-27 13:47 Petr Mladek
2020-11-27 19:19 ` pr-tracker-bot

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=87lfg85xz1.fsf@jogness.linutronix.de \
    --to=john.ogness@linutronix.de \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=daniel.thompson@linaro.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=peterz@infradead.org \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=sergey.senozhatsky@gmail.com \
    --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

Powered by JetHome