lkml.org 
[lkml]   [2008]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] Sectionized printk data
On Mon, Feb 04, 2008 at 04:48:34PM +0100, Johannes Weiner wrote:
> Hi,
>
> current approaches to have printk format strings in the corresponding
> data section to the function they appear in look like the following (at
> least what I have seen so far):
>
> int __init some_function(void)
> {
> static char errmsg[] __initdata = "failure %s in %s\n";
>
> [...]
> printk(errmsg);
> [...]
> }
>
> The attached patch allows something along the lines:
>
> int __init some_function(void)
> {
> [...]
> pr_init(KERN_WARNING "failure %s in %s\n", ...);
> [...]
> }
>
> Another idea I had was to make printk a macro that figures out the
> section of the surrounding function and then moves the data
> automatically when it is a literal, but I couldn't find mechanisms that
> allow this. Anyone of you got an idea?
>
> What do you think in general?

What is the rationale behind this?
In other words why should we investigate time looking into the matter?

If you say "saving memory" then please let us know with specific examples
in what area these savings will really pay off.

Thanks,
Sam


\
 
 \ /
  Last update: 2008-02-04 19:11    [W:0.071 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site