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

Tim Bird tim.bird at am.sony.com
Tue Jun 19 01:07:58 UTC 2012


On 06/16/2012 08:53 AM, David Woodhouse wrote:
> On Sat, 2012-06-16 at 07:54 -0700, Greg KH wrote:
>> 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. 

FWIW, Sony has embedded devices that ship both with and without
CONFIG_HOTPLUG turned on.  It may be interesting to some that
we turn CONFIG_HOTPLUG on for memory-constrained devices, and
use it to move memory into and out of the Linux portion of the
system, at times when we know it will be useful for Linux
and not needed elsewhere.

More concretely, we have a camera with 32M of RAM, where 16M is
normally allocated to Linux, and 16M to the image sensor.
During bootup, 8M or 16M of that second pool are made
available to Linux to  improve boot time, and then removed
from Linux for use by the camera after boot.

> And even if it was, I think the onus would be on anyone who wants to
> preserve those saving, to come up with an automated way of dropping the
> unneeded bits from the final binary *without* cluttering the source
> code.

Recently, I've been doing some research on exactly this.   That is,
using automation and annotations outside the source code to remove
unneeded bits.  I don't know if I'll have any results to show by
August  (if not, the project will likely have been canceled),
but if people are interested I can discuss what I'm doing
in a hallway track.

> 
> The -ffunction-sections --gc-sections approach works relatively well,
> and could feasibly be extended to identify those functions which are
> referenced, even indirectly, from non-init code. Our tools already do
> half the fun work of that anyway, just for validation purposes.

What tools are you referring to here?

Thanks,
 -- 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