Re: [PATCH 0/6] loglevel=pci:8,acpi:8,apic=8 support v6

From: Yinghai Lu
Date: Thu Sep 18 2008 - 15:06:40 EST


On Thu, Sep 18, 2008 at 11:39 AM, H. Peter Anvin <hpa@xxxxxxxxx> wrote:
> Jason Baron wrote:
>>
>> in my testing there was no significant difference between pre-filtering
>> vs. not built in. However, there was a measureable affect of having them
>> built in vs. not built in.
>>
>
> <somewhat irrelevant rant>
>
> Okay, I'm so bloody sick of hearing people justifying bloat by saying "no
> measurable difference." That only means that you don't have GROSS bloat.
> Unless you have real statistics to the contrary, most people's performance
> testing is at the very best accurate to 5-10%. This is hardly "no bloat".
>
> </somewhat irrelevant rant>

about performance difference:
1. will have printk(KERN_level KERN_tag "...\n");
2. will have tag_printk like
#define dev_printk(level, dev, format, arg...) \
printk(level KERN_DEV "%s %s: " format , dev_driver_string(dev) , \
dev_name(dev) , ## arg)
3. still can use MACRO for compiling time
#ifdef DEBUG
#define dev_dbg(dev, format, arg...) \
dev_printk(KERN_DEBUG , dev , format , ## arg)
#else
#define dev_dbg(dev, format, arg...) \
({ if (0) dev_printk(KERN_DEBUG, dev, format, ##arg); 0; })
#endif
4. with /proc/sys/kernel/printk_tag/dev could modify run-time level.
5. for big chunk dump or spew, caller could use
level = get_tag_level(KERN_DEV, &len) and compare level to
KERN_SPEW_LEVEL or etc
to decide if need to dump it.
6. other overhead to put tag like <dev> should be ok just like
loglevel aready in the buffer

current only have one struct {
char *tag;
char *name; /* with extra : */
int level;
}
the level is some kind of console_loglevel for that tag.

if want to go further, let every dev_printk check that. then will not
have them in log buffer

YH
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/