From: Luis Chamberlain <mcgrof@kernel.org>
To: Yoann Congal <yoann.congal@smile.fr>,
Josh Triplett <josh@joshtriplett.org>,
Petr Mladek <pmladek@suse.com>,
Steven Rostedt <rostedt@goodmis.org>,
John Ogness <john.ogness@linutronix.de>,
Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
linux-serial@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-kbuild@vger.kernel.org,
"Geert Uytterhoeven" <geert@linux-m68k.org>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Ingo Molnar" <mingo@redhat.com>,
"Borislav Petkov" <bp@alien8.de>,
"Dave Hansen" <dave.hansen@linux.intel.com>,
"H. Peter Anvin" <hpa@zytor.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Jiri Slaby" <jirislaby@kernel.org>,
"Willem de Bruijn" <willemdebruijn.kernel@gmail.com>,
"Matthew Wilcox" <willy@infradead.org>,
"Peter Zijlstra" <peterz@infradead.org>,
"Darren Hart" <dvhart@infradead.org>,
"Davidlohr Bueso" <dave@stgolabs.net>,
"André Almeida" <andrealmeid@igalia.com>,
"Masahiro Yamada" <masahiroy@kernel.org>
Subject: Re: [PATCH v2] printk: Remove redundant CONFIG_BASE_SMALL
Date: Mon, 29 Jan 2024 08:00:23 -0800 [thread overview]
Message-ID: <ZbfLl6PR_qxxreeX@bombadil.infradead.org> (raw)
In-Reply-To: <20240127220026.1722399-1-yoann.congal@smile.fr>
You wanna address the printk maintainers, which I've added now.
And Josh as he's interested in tiny linux.
On Sat, Jan 27, 2024 at 11:00:26PM +0100, Yoann Congal wrote:
> CONFIG_BASE_SMALL is currently a type int but is only used as a boolean
> equivalent to !CONFIG_BASE_FULL.
>
> So, remove it entirely and move every usage to !CONFIG_BASE_FULL.
Thanks for doing this.
> In addition, recent kconfig changes (see the discussion in Closes: tag)
> revealed that using:
> config SOMETHING
> default "some value" if X
> does not work as expected if X is not of type bool.
We should see if we can get kconfig to warn on this type of use.
Also note that this was reported long ago by Vegard Nossum but he
never really sent a fix [0] as I suggested, so thanks for doing this
work.
[0] https://lkml.iu.edu/hypermail/linux/kernel/2110.2/02402.html
You should mention the one case which this patch fixes is:
> CONFIG_BASE_SMALL was used that way in init/Kconfig:
> config LOG_CPU_MAX_BUF_SHIFT
> default 12 if !BASE_SMALL
> default 0 if BASE_SMALL
You should then mention this has been using 12 for a long time now
for BASE_SMALL, and so this patch is a functional fix for those
who used BASE_SMALL and wanted a smaller printk buffer contribtion per
cpu. The contribution was only per CPU, and since BASE_SMALL systems
likely don't have many CPUs the impact of this was relatively small,
4 KiB per CPU. This patch fixes that back down to 0 KiB per CPU.
So in practice I'd imagine this fix is not critical to stable. However
if folks do want it backported I'll note BAS_FULL has been around since
we started with git on Linux so it should backport just fine.
> diff --git a/init/Kconfig b/init/Kconfig
> index 8d4e836e1b6b1..877b3f6f0e605 100644
> --- a/init/Kconfig
> +++ b/init/Kconfig
> @@ -734,8 +734,8 @@ config LOG_CPU_MAX_BUF_SHIFT
> int "CPU kernel log buffer size contribution (13 => 8 KB, 17 => 128KB)"
> depends on SMP
> range 0 21
> - default 12 if !BASE_SMALL
> - default 0 if BASE_SMALL
> + default 12 if BASE_FULL
> + default 0
> depends on PRINTK
> help
> This option allows to increase the default ring buffer size
This is the only functional change, it is a fix, so please address
this in a separate small patch where you can go into all the above
details about its issue and implications of fixing this as per my
note above.
Then you can address a separate patch which addresses the move of
BASE_SMALL users to BASE_FULL so to remove BASE_SMALL, that is
because that commit would have no functional changes and it makes
it easier to review.
Luis
next prev parent reply other threads:[~2024-01-29 16:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-27 22:00 [PATCH v2] printk: Remove redundant CONFIG_BASE_SMALL Yoann Congal
2024-01-29 11:28 ` Jiri Slaby
2024-01-29 12:56 ` Yoann Congal
2024-01-29 16:00 ` Luis Chamberlain [this message]
2024-01-31 14:34 ` Masahiro Yamada
2024-01-31 15:47 ` John Ogness
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=ZbfLl6PR_qxxreeX@bombadil.infradead.org \
--to=mcgrof@kernel.org \
--cc=andrealmeid@igalia.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=dave@stgolabs.net \
--cc=dvhart@infradead.org \
--cc=geert@linux-m68k.org \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=jirislaby@kernel.org \
--cc=john.ogness@linutronix.de \
--cc=josh@joshtriplett.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=senozhatsky@chromium.org \
--cc=tglx@linutronix.de \
--cc=willemdebruijn.kernel@gmail.com \
--cc=willy@infradead.org \
--cc=x86@kernel.org \
--cc=yoann.congal@smile.fr \
/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