Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1494476
| From | Joe Perches <joe@perches.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] realtek: rtl8xxxu: Use const init arrays |
| Date | 2016-10-01 22:10 +0200 |
| Message-ID | <snyLE-4Z6-29@gated-at.bofh.it> (permalink) |
| References | <snwqu-3fm-5@gated-at.bofh.it> <snxFZ-43q-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Sat, 2016-10-01 at 14:53 -0400, Jes Sorensen wrote: > Joe Perches <joe@perches.com> writes: > > Make the init arrays const to reduce data. > > $ size drivers/net/wireless/realtek/rtl8xxxu/built-in.o* (allyesconfig: x86-32) > > text data bss dec hex filename > > 80107 13651 58 93816 16e78 drivers/net/wireless/realtek/rtl8xxxu/built-in.o.new > > 65303 28435 58 93796 16e64 drivers/net/wireless/realtek/rtl8xxxu/built-in.o.old > In total you grow the kernel by 20 bytes. You reduce the data segment > substantially while growing the text segment instead. No, not really. The alignment boundaries move a bit for this particular compilation. It could go the other way for a different compiler version or set of CONFIG options. What's important is multiple pages of .data move to .rodata.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] realtek: rtl8xxxu: Use const init arrays Joe Perches <joe@perches.com> - 2016-10-01 19:40 +0200
Re: [PATCH] realtek: rtl8xxxu: Use const init arrays Jes Sorensen <Jes.Sorensen@redhat.com> - 2016-10-01 21:00 +0200
Re: [PATCH] realtek: rtl8xxxu: Use const init arrays Joe Perches <joe@perches.com> - 2016-10-01 22:10 +0200
Re: [PATCH] realtek: rtl8xxxu: Use const init arrays Jes Sorensen <Jes.Sorensen@redhat.com> - 2016-10-01 22:40 +0200
Re: [PATCH] realtek: rtl8xxxu: Use const init arrays Joe Perches <joe@perches.com> - 2016-10-01 23:10 +0200
Re: [PATCH] realtek: rtl8xxxu: Use const init arrays Jes Sorensen <Jes.Sorensen@redhat.com> - 2016-10-02 01:30 +0200
csiph-web