On Thursday 20 September 2007 2:58:44 pm Alexey Dobriyan wrote:So define a level 0 that doesn't prepend any level to the string, and have the macro filter that out at the same default level it counts as now. (KERN_INFO, I think?) The tests are all on contants which should resolve at compile time and the dead code eliminator should zap it, even if the macro gets more complicated it shouldn't result in a bigger binary. Because we never change kernel internal APIs. Oh yeah. Never happens. Let me get this straight: you're objecting to actually making the printk levels useful enough that developers start to care what they're set to, because then they might be motivated to want some of them changed? Make it useful, people might care, thus they might talk about it... Sorry, I'm still missing the downside here. That's the main reason I haven't played with it so far, although it would be easy to define a new symbol (dprintk or some such, although I note several drivers are already using that) and transition gradually. *Shrug*. My problem is that switching off printk is the single biggest bloat cutter in the kernel, yet it makes the resulting system very hard to support. It combines a big upside with a big downside, and I'd like something in between. But ignore_loglevel doesn't decrease the size of the _binary_. That's what we're talking about here with the -tiny tree. Embedded developers want to squeeze more code onto smaller flash/rom chips. Setting ignore_loglevel does prevent these messages from ever being emitted, but they're still in the kernel image as dead weight. It saves noise but doesn't save _space_. I'm proposing allowing an ignore_loglevel to remove the unused messages at compile time so they don't take up space. Doing that requires the levels to be integers so they can be compared with < or >, and the remaining changes follow logically. (To me, anyway...) Rob -- "One of my most productive days was throwing away 1000 lines of code." - Ken Thompson. -
| Arnd Bergmann | Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures |
| Andrew Morton | 2.6.23-rc1-mm2 |
| Nick Piggin | [patch 3/6] mm: fix fault vs invalidate race for linear mappings |
| KOSAKI Motohiro | [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
git: | |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Herbert Xu | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | [GIT]: Networking |
| David Miller | Re: [BUG] New Kernel Bugs |
