public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rob Landley <rob@landley.net>
To: Joe Perches <joe@perches.com>
Cc: holzheu@linux.vnet.ibm.com,
	Vegard Nossum <vegard.nossum@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Dick Streefland <dick.streefland@altium.nl>
Subject: Re: [RFC] New kernel-message logging API
Date: Mon, 24 Sep 2007 20:46:40 -0500	[thread overview]
Message-ID: <200709242046.40244.rob@landley.net> (raw)
In-Reply-To: <1190679032.636.7.camel@localhost>

On Monday 24 September 2007 7:10:32 pm Joe Perches wrote:
> On Mon, 2007-09-24 at 18:51 -0500, Rob Landley wrote:
> > > An added pass between gcc preprocessor and compiler could compact
> > > or compress the format string without modifying the conversion
> > > specifications so __attribute__ ((format (printf)) would still work.
> >
> > This does not address my problem.  Spitting out a proprietary hash code
> > instead of a human readable message is not a solution for my use case.
>
> What is your problem Rob?

The single largest space savings in the existing -tiny patches comes from 
removing printk() calls and strings.  I would like to be able to selectively 
do this based on severity level, which is information most existing printk() 
calls already have.  I proposed a minimal change to how printk() works, 
allowing the compiler to remove unused code that wouldn't be below the 
displayed level of printk() anyway in the deployed product so wouldn't 
actually lose any output.

The kernel image is usually already compressed in flash and decompressed to 
dram during boot.  (Not always, sometimes it's run directly out of flash, but 
there's often a speed penalty for doing this, you have to set it up 
specially, and dram is cheaper than flash anyway.)  This means recompressing 
it doesn't help save flash.

If you want to save dram, have printk and associated strings be a function in 
a module that's demand loaded and unloaded again after each call.  Then you 
can foist compression off on userspace, and we're already used to modules 
having to match a given kernel version exactly.  Why come up with new 
infrastructure?

Rob
-- 
"One of my most productive days was throwing away 1000 lines of code."
  - Ken Thompson.

  reply	other threads:[~2007-09-25  1:46 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-22 19:27 [RFC] New kernel-message logging API Vegard Nossum
2007-09-23  0:13 ` Joe Perches
2007-09-23  0:40   ` Kyle Moffett
2007-09-23  0:47     ` Joe Perches
2007-09-23  3:43       ` Kyle Moffett
2007-09-23  8:39   ` Vegard Nossum
2007-09-23  8:45     ` Jan Engelhardt
2007-09-23  9:20       ` Vegard Nossum
2007-09-23  9:38         ` Jan Engelhardt
2007-09-23 19:23       ` Joe Perches
2007-09-23 19:25     ` Joe Perches
2007-09-23  1:05 ` Miguel Ojeda
2007-09-25  5:27   ` Vegard Nossum
2007-09-25 17:24     ` Miguel Ojeda
2007-09-23 20:05 ` Rob Landley
2007-09-24  9:22 ` Michael Holzheu
2007-09-24 15:19   ` Joe Perches
2007-09-24 16:43     ` Vegard Nossum
2007-09-24 17:00       ` Joe Perches
2007-09-24 20:37         ` Vegard Nossum
2007-09-25  1:18           ` Rob Landley
2007-09-24 23:51     ` Rob Landley
2007-09-25  0:10       ` Joe Perches
2007-09-25  1:46         ` Rob Landley [this message]
2007-09-25  8:57     ` Michael Holzheu
2007-09-24 18:26 ` Jesse Barnes
  -- strict thread matches above, loose matches on Subject: below --
2007-09-25  4:58 linux
2007-09-25  6:54 ` Joe Perches
2007-09-25  7:50   ` linux
2007-09-25  8:06   ` Vegard Nossum

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=200709242046.40244.rob@landley.net \
    --to=rob@landley.net \
    --cc=dick.streefland@altium.nl \
    --cc=holzheu@linux.vnet.ibm.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vegard.nossum@gmail.com \
    /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