[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1261329743.30458.179.camel@Joe-Laptop.home>
Date: Sun, 20 Dec 2009 09:22:23 -0800
From: Joe Perches <joe@...ches.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: San Mehat <san@...gle.com>, Ingo Molnar <mingo@...e.hu>,
Arjan van de Ven <arjan@...radead.org>,
lkml <linux-kernel@...r.kernel.org>
Subject: Re: sched: restore sanity
On Sun, 2009-12-20 at 16:19 +0100, Peter Zijlstra wrote:
> On Sun, 2009-12-20 at 07:05 -0800, San Mehat wrote:
> > >> Probably, but the rest is just as annoying, pr_* is crap.
> > Oh? Out of curiosity whats wrong with it?
> That's what should be asked of printk().
pr_<level> offers some things printk cannot:
o standardization, eliminates frequent missing KERN_ levels
and missing/typo/misspelled module prefixes
o visually shorter, fewer chars used, less 80 char wrapping
o finer grained ability to eliminate unnecessary messages
for embedded systems
o standardized mechanism to prefix messages with module/function
o eventual code reduction via use of a singleton instead of
duplicated module/function names
o eventual dynamic_debug styled control of prefix by
module/function
There are quite of number of arbitrarily named module wrapper
macros and functions that build on printk.
Standardizing them around a fewer number of prefixes would
ease grepping for logging.
A standardized logging function to filter messages by
bitmask or level could also be useful.
> We try to stick to ANSI-C as much as possible, we've got
> kalloc,kfree,strcmp,strnlen and all the other 'regular' C bits,
> deviating from that serves no purpose but seed confusion.
There is a lot of kernel code that isn't 'regular' C.
Nothing in pr_<level> is not ANSI-C, it just builds on printk.
> But I feel this has no place in the core kernel at all, esp when its
> getting in the way of things without offering a single benefit.
What are the negatives of using pr_<level>?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists