On Fri, 2008-06-13 at 15:00 -0400, Jason Baron wrote:Some general and specific comments. I don't understand why you use NR_CPUS. Also, I think the major use cases are 1 or 2 modules enabled, no modules enabled, or all modules enabled, so the hashing of module names is particularly not useful. Any pr_debug or dev_dbg is in a slow path. I think a list and a direct comparison to KBUILD_MODNAME would be simpler and as fast as necessary. I think that set level=<#> should also work for "all" Perhaps a simpler interface would be to use enable <module> <level> where <level> not specified is 0. [] Because the return values aren't used, the functions might as well be declared void You should probably add a sprinkling of "const" to the argument lists. +extern void dynamic_printk(char *, char *, ...); + dynamic_printk(KBUILD_MODNAME, \ + KERN_DEBUG KBUILD_MODNAME ": " fmt,\ Instead of prefixing every fmt with KBUILD_MODNAME ": ", why not change this to something like: extern void dynamic_printk(const char *level, const char *module, const char *fmt, ...); and just do the printk in 2 parts? if (module_enabled) { printk("%s%s: ", level, module); vprintk(fmt, args); } If not that, why should dynamic_printk prefix a KBUILD_MODNAME at all? Why not just check if the module is enabled, then output what the code specifies? trivial: The dynamic versions of the dev_dbg and pr_debug macros don't return the number of chars output, but always return 0. --
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Benjamin Herrenschmidt | Re: [PATCH] Remove process freezer from suspend to RAM pathway |
| Bart Van Assche | Re: Integration of SCST in the mainstream Linux kernel |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Arjan van de Ven | Re: [GIT]: Networking |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Natalie Protasevich | [BUG] New Kernel Bugs |
