From: Ingo Molnar <mingo@kernel.org>
To: Mathias Krause <minipli@googlemail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
Joe Perches <joe@perches.com>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCHv3 0/9] Mark literal strings in __init / __exit code
Date: Fri, 22 Aug 2014 10:24:59 +0200 [thread overview]
Message-ID: <20140822082459.GA8771@gmail.com> (raw)
In-Reply-To: <CA+rthh8XzSC-n+WaYEWiJQdF1XOSRiGSmxpJSFy9duXOOwXX_w@mail.gmail.com>
* Mathias Krause <minipli@googlemail.com> wrote:
> > It feels like a burdensome hack that kernel developers are
> > forced to use different printing facilities, depending on
> > the life cycle of a method. We want to simplify init
> > annotations, we don't want to complicate them!
>
> Does this:
>
> pi_info("mkiss: AX.25 Multikiss, Hans Albas PE1AYX\n");
>
> really look more complicated compared to this?:
>
> static const char banner[] __initconst = KERN_INFO \
> "mkiss: AX.25 Multikiss, Hans Albas PE1AYX\n";
> printk(banner);
>
> The latter can be found in drivers/net/hamradio/mkiss.c. Aged
> code, admitted. But we have a few more of those and the
> pi_info() looks way more appealing to me by doing the very
> same thing ;)
My point is that both are complicated, compared to using the
regular printk() variants.
In general printk()s should not be aware of what function
context they are in.
> > And if tooling isn't ready for this, then wouldn't the
> > right solution be to improve tooling - instead of
> > complicating the kernel?
>
> Plugin based approaches for this have been mentioned before
> but those suffer from the same "global view" problem. So,
> IMHO it's not that easy to solve it at the toolchain level.
It might be solved via a regular tooling feature, or via
tooling extension based on plugins.
Regardless of how it's implemented on the tooling side, my
point remains: this kind of optimization is done on the tooling
side in a natural fashion, while it's an ongoing maintenance
concern on the kernel side.
So it should be done on the tooling side, especially as the
benefits appear to be marginal.
Thanks,
Ingo
next prev parent reply other threads:[~2014-08-22 8:25 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-21 12:23 [PATCHv3 0/9] Mark literal strings in __init / __exit code Mathias Krause
2014-08-21 12:23 ` [PATCHv3 1/9] init.h: Add __init_str / __exit_str macros Mathias Krause
2014-08-21 12:23 ` [PATCHv3 2/9] printk: Provide pi_<level> / pe_<level> macros for __init / __exit code Mathias Krause
2014-08-21 12:23 ` [PATCHv3 3/9] kallsyms: exclude pseudo symbols for __init / __exit strings Mathias Krause
2014-08-21 12:23 ` [PATCHv3 4/9] modpost: provide better diagnostics " Mathias Krause
2014-08-21 12:23 ` [PATCHv3 5/9] x86, acpi: Mark __init strings as such Mathias Krause
2014-08-21 12:23 ` [PATCHv3 6/9] x86, mm: Make x86_init.memory_setup() return a const char * Mathias Krause
2014-08-21 12:23 ` [PATCHv3 7/9] x86, mm: early_panic() - pass on the message as string Mathias Krause
2014-08-21 12:23 ` [PATCHv3 8/9] x86, mm: e820 - mark __init strings as such Mathias Krause
2014-08-21 12:23 ` [PATCHv3 9/9] x86: setup " Mathias Krause
2014-08-21 12:57 ` [PATCHv3 0/9] Mark literal strings in __init / __exit code Ingo Molnar
2014-08-21 14:29 ` Mathias Krause
2014-08-22 8:24 ` Ingo Molnar [this message]
2014-08-30 15:28 ` Mathias Krause
2014-09-16 8:57 ` Ingo Molnar
2014-08-21 16:25 ` Sam Ravnborg
2014-08-24 16:04 ` Mathias Krause
2014-08-24 16:28 ` Joe Perches
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=20140822082459.GA8771@gmail.com \
--to=mingo@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=mingo@redhat.com \
--cc=minipli@googlemail.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