Messages in this thread | | | Date | Mon, 9 Apr 2012 16:08:03 -0700 | From | Andrew Morton <> | Subject | Re: [PATCH] printk(): add KERN_CONT where needed |
| |
On Tue, 3 Apr 2012 05:00:10 +0200 Kay Sievers <kay@vrfy.org> wrote:
> > Maybe it'd be better to aggregate content rather like > > printk does. __Aggregate until you get a newline or a > > new KERN_<LEVEL> > > The continuation printk() can can always go wrong when multiple > threads do that in parallel. We can try to make it better with a > per-cpu buffer, but I guess there will always be a situation where > this can happen.
Maybe we can be a bit smarter. For example, if `current' is unchanged and __builtin_return_address(0) is unchanged, keep on buffering.
It's all a bit hacky, but weeding out all those thousands of printks which never get printed anyway doesn't sound much fun either.
> - printk(")"); > + printk(KERN_CONT ")");
And I do think we should avoid doing it that way, if only because it consumes 10 display columns and makes a mess. Maybe use pr_cont()? But that implies that the affected code is using the pr_foo() facilities, and a lot of it doesn't. So maybe a new macro.
All a bit of a pain.
| |