Re: [PATCH 09/20] ACPI: thinkpad-acpi: uncouple subdriver init from ibms struct

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 21 Apr 2007, Len Brown wrote:
> On Saturday 21 April 2007 10:08, Henrique de Moraes Holschuh wrote:
> > From: Henrique de Moraes Holschuh <hmh@xxxxxxxxxx>
> > 
> > Move the .init method from ibms struct to another struct, and use a list
> > head to control which subdrivers have been activated.
> > 
> > This allows us to have the subdriver init methods marked __init, saving
> > quite a lot of .text size, and even a bit of .data size as some data can
> > now be made __initdata.
> 
> does this save any space when the driver is compiled as a module?

Using gcc 4.1.2 20061115 pre-release (from Debian 4.1.1-21) and objdump -w
-h, I get the following changes:

bss: no change
text: decreases from 0x46d8 to 0x3658
data: decreases from 0x7b4 to 0x784
init.text: increases from 0x5ff to 0x171f
init.data: increases from 0 to 0x2b6

and now the usual issues with gcc and its .rodata handling even while inside
__init and __initdata:

rodata*: total increase of 0xbc bytes.

So yes, there are savings when used as a module, unless objdump is lying to
me or I failed to understand how these things play together when the kernel
links the module at runmtime.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
ibm-acpi-devel mailing list
ibm-acpi-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel

[Index of Archives]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Photo]     [Yosemite Photos]     [Yosemite Advice]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux