public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] x86_64: Do not use -ffunction-sections for modules
       [not found] <11509074684035-git-send-email-vsu@altlinux.ru>
@ 2006-06-21 16:41 ` Andi Kleen
  2006-06-21 16:51   ` Sergey Vlasov
  0 siblings, 1 reply; 3+ messages in thread
From: Andi Kleen @ 2006-06-21 16:41 UTC (permalink / raw)
  To: Sergey Vlasov; +Cc: Arjan van de Ven, linux-x86_64, linux-kernel


The correct mailing list is still discuss@x86-64.org

On Thursday 01 January 1970 01:00, Sergey Vlasov wrote:
> Currently CONFIG_REORDER uses -ffunction-sections for all code;
> however, creating a separate section for each function is not useful
> for modules and just adds bloat. 

You mean the ELF files are larger? .text/.data size shouldn't
change in theory.

> Moving this option from CFLAGS to 
> CFLAGS_KERNEL shrinks module object files (e.g., the module tree for a
> kernel built with most drivers as modules shrinked from 54M to 46M),
> and decreases the number of sysfs files in /sys/module/*/sections/
> directories.

Thanks applied.

-Andi

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86_64: Do not use -ffunction-sections for modules
  2006-06-21 16:41 ` [PATCH] x86_64: Do not use -ffunction-sections for modules Andi Kleen
@ 2006-06-21 16:51   ` Sergey Vlasov
  2006-06-21 16:54     ` Andi Kleen
  0 siblings, 1 reply; 3+ messages in thread
From: Sergey Vlasov @ 2006-06-21 16:51 UTC (permalink / raw)
  To: Andi Kleen; +Cc: Arjan van de Ven, discuss, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1905 bytes --]

On Wed, Jun 21, 2006 at 06:41:33PM +0200, Andi Kleen wrote:
> The correct mailing list is still discuss@x86-64.org

Noted.

> On Thursday 01 January 1970 01:00, Sergey Vlasov wrote:
> > Currently CONFIG_REORDER uses -ffunction-sections for all code;
> > however, creating a separate section for each function is not useful
> > for modules and just adds bloat. 
> 
> You mean the ELF files are larger?

Yes, and all these sections are then reported in sysfs (BTW, what programs
really use /sys/module/*/sections/* files?).

> .text/.data size shouldn't > change in theory.

Actually, it does change by a small amount for some reason - even
increases by about 100 bytes in some cases; however, I suppose that the
size reported by /proc/modules and lsmod is more important, and it
decreases:

before:
ext3                  138896  4 
jbd                    58152  1 ext3
mbcache                10248  1 ext3
sata_nv                11140  13 
libata                 75928  1 sata_nv
sd_mod                 21912  6 
scsi_mod              155824  3 usb_storage,libata,sd_mod
ide_disk               17536  0 
ide_generic             1664  0 [permanent]
amd74xx                15280  0 [permanent]
generic                 5892  0 [permanent]
ide_core              150624  6 ide_cd,usb_storage,ide_disk,ide_generic,amd74xx,generic

after:
ext3                  129040  4 
jbd                    53672  1 ext3
mbcache                 9608  1 ext3
sata_nv                10756  13 
libata                 69784  1 sata_nv
sd_mod                 20760  6 
scsi_mod              145200  3 usb_storage,libata,sd_mod
ide_disk               16384  0 
ide_generic             1664  0 [permanent]
amd74xx                14896  0 [permanent]
generic                 5764  0 [permanent]
ide_core              140768  6 ide_cd,usb_storage,ide_disk,ide_generic,amd74xx,generic

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86_64: Do not use -ffunction-sections for modules
  2006-06-21 16:51   ` Sergey Vlasov
@ 2006-06-21 16:54     ` Andi Kleen
  0 siblings, 0 replies; 3+ messages in thread
From: Andi Kleen @ 2006-06-21 16:54 UTC (permalink / raw)
  To: Sergey Vlasov; +Cc: Arjan van de Ven, discuss, linux-kernel

On Wednesday 21 June 2006 18:51, Sergey Vlasov wrote:

> > On Thursday 01 January 1970 01:00, Sergey Vlasov wrote:
> > > Currently CONFIG_REORDER uses -ffunction-sections for all code;
> > > however, creating a separate section for each function is not useful
> > > for modules and just adds bloat. 
> > 
> > You mean the ELF files are larger?
> 
> Yes, and all these sections are then reported in sysfs (BTW, what programs
> really use /sys/module/*/sections/* files?).

Good question. I also always considered it bloat.

> 
> > .text/.data size shouldn't > change in theory.
> 
> Actually, it does change by a small amount for some reason - even
> increases by about 100 bytes in some cases;

Ok maybe a few small vs large jumps

> however, I suppose that the 
> size reported by /proc/modules and lsmod is more important, and it
> decreases:

Ok thanks.

-Andi

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-06-21 16:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <11509074684035-git-send-email-vsu@altlinux.ru>
2006-06-21 16:41 ` [PATCH] x86_64: Do not use -ffunction-sections for modules Andi Kleen
2006-06-21 16:51   ` Sergey Vlasov
2006-06-21 16:54     ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox