[Ksummit-2012-discuss] Topic proposal: Finding and eliminating kernel work creation schemes

Tim Bird tim.bird at am.sony.com
Tue Jun 19 23:11:29 UTC 2012


On 06/16/2012 07:54 AM, Greg KH wrote:
> On Sat, Jun 16, 2012 at 06:53:06PM +0530, Balbir Singh wrote:
>> On Sat, Jun 16, 2012 at 5:17 PM, James Bottomley
>> <James.Bottomley at hansenpartnership.com> wrote:
>>>
>>> I'm sure everyone has a different idea of what is and isn't work
>>> creation within the kernel; for instance some see value in pr_...
>>> replacement for printk(KERN_...). �However if we discuss our pet peeves
>>> in this department, perhaps we can find some of the ones that everyone
>>> agrees serve no useful purpose. �I'll start with mine:
>>>
>>> Although __init and __exit are fine and reasonably well contained, the
>>> massive proliferation of __dev... _mem... __cpu... and their ilk are
>>> getting out of control. �Plus, the amount of memory they save is tiny (a
>>> few pages at best) and finally virtually no-one compiles without
>>> CONFIG_HOTPLUG, so they're mostly nops anyway. �However, for that very
>>> case, we've evolved a massive set of tools to beat ourselves up whenever
>>> we violate the rules of using these tags. �What I'd like to explore is
>>> firstly, can we just eliminate CONFIG_HOTPLUG and make it always y (this
>>> will clear up the problem nicely) or, failing that, can we just dump the
>>> tags and the tools and stop causing work for something no-one cares
>>> about.
>>
>> Do you expect CONFIG_HOTPLUG to be true even for embedded devices? Android, etc?
> 
> Do you expect to never plug any device into those systems after they
> have been booted?  Never plug those systems into another one?
> 
> Usually that isn't true, so I agree with just dropping CONFIG_HOTPLUG
> and fixing up this __dev mess.
> 
> Even the CONFIG_TINY people usually want to plug their device into
> something at some point in time, and if not, it really isn't saving them
> much, if any, memory to not do so.

The difficulty in trying to use Linux to attack extremely
small systems arises due to "death by a thousand cuts". With
the Linux tiny work started by Matt Mackall many years ago,
and the succession of efforts since then, I think we've
pretty much exhausted the low-hanging fruit for reducing
the kernel through manual configuration.  These days it's
relatively hard to find an easy change that will save more
than 5K.  And even 5K is hardly interesting to anyone these
days, especially if it means increased maintenance burden
going forward.

This is why I am interested in automated solutions.  I'm
not sure if CONFIG_HOTPLUG is something that could be
automatically handled or not, but I should take a closer
look at it.
 -- Tim


=============================
Tim Bird
Architecture Group Chair, CE Workgroup of the Linux Foundation
Senior Staff Engineer, Sony Network Entertainment
=============================



More information about the Ksummit-2012-discuss mailing list