[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zd9wRpJcijVcoBvz@smile.fi.intel.com>
Date: Wed, 28 Feb 2024 19:41:26 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Geert Uytterhoeven <geert+renesas@...der.be>
Cc: Chris Down <chris@...isdown.name>, Petr Mladek <pmladek@...e.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jessica Yu <jeyu@...nel.org>, Steven Rostedt <rostedt@...dmis.org>,
John Ogness <john.ogness@...utronix.de>,
Sergey Senozhatsky <senozhatsky@...omium.org>,
Jason Baron <jbaron@...mai.com>, Jim Cromie <jim.cromie@...il.com>,
Ilya Dryomov <idryomov@...il.com>, Xiubo Li <xiubli@...hat.com>,
Jeff Layton <jlayton@...nel.org>, linux-kernel@...r.kernel.org,
ceph-devel@...r.kernel.org
Subject: Re: [PATCH 0/4] printk_index: Fix false positives
On Wed, Feb 28, 2024 at 03:00:01PM +0100, Geert Uytterhoeven wrote:
> Hi all,
>
> When printk-indexing is enabled, each printk() invocation emits a
> pi_entry structure, containing the format string and other information
> related to its location in the kernel sources. This is even true when
> the printk() is protected by an always-false check, as is typically the
> case for debug messages: while the actual code to print the message is
> optimized out by the compiler, the pi_entry structure is still emitted.
> Hence when debugging is disabled, this leads to the inclusion in the
> index of lots of printk formats that cannot be emitted by the current
> kernel.
>
> This series fixes that for the common debug helpers under include/.
> It reduces the size of an arm64 defconfig kernel with
> CONFIG_PRINTK_INDEX=y by ca. 1.5 MiB, or 28% of the overhead of
> enabling CONFIG_PRINTK_INDEX=y.
>
> Notes:
> - netdev_(v)dbg() and netif_(v)dbg() are not affected, as
> net{dev,if}_printk() do not implement printk-indexing, except
> for the single global internal instance of __netdev_printk().
> - This series fixes only debug code in global header files under
> include/. There are more cases to fix in subsystem-specific header
> files and in sources files.
The whole series makes a lot of sense and gives a good examples for above
mentioned subsystem specific code on how to do it in a better way.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists