Re: [RFC PATCH] x86: enable dead code and data elimination (LTO)

2017-07-12 Thread Nicholas Piggin
On Wed, 12 Jul 2017 09:29:40 -0700 Andi Kleen wrote: > Nicholas Piggin writes: > >> > >> I think we should aim for gc-sections to be used by default and have LTO > >> as a possible option only. > > > > I agree after it starts getting implemented and debugged by small > > system users, we cou

Re: [RFC PATCH] x86: enable dead code and data elimination (LTO)

2017-07-12 Thread Nicolas Pitre
On Wed, 12 Jul 2017, Andi Kleen wrote: > Nicholas Piggin writes: > >> > >> I think we should aim for gc-sections to be used by default and have LTO > >> as a possible option only. > > > > I agree after it starts getting implemented and debugged by small > > system users, we could make it defaul

Re: [RFC PATCH] x86: enable dead code and data elimination (LTO)

2017-07-12 Thread Andi Kleen
Nicholas Piggin writes: >> >> I think we should aim for gc-sections to be used by default and have LTO >> as a possible option only. > > I agree after it starts getting implemented and debugged by small > system users, we could make it default in the interest of sharing > testing and reducing co

Re: [RFC PATCH] x86: enable dead code and data elimination (LTO)

2017-07-09 Thread Nicholas Piggin
On Sun, 9 Jul 2017 09:59:44 -0400 (EDT) Nicolas Pitre wrote: > On Sun, 9 Jul 2017, Masahiro Yamada wrote: > > > Hi. > > > > 2017-07-09 18:05 GMT+09:00 Ingo Molnar : > > > > > > * Nicholas Piggin wrote: > > > > > >> FYI, easiest way to check if you forgot to KEEP a linker table is > > >> to

Re: [RFC PATCH] x86: enable dead code and data elimination (LTO)

2017-07-09 Thread Nicolas Pitre
On Sun, 9 Jul 2017, Masahiro Yamada wrote: > Hi. > > 2017-07-09 18:05 GMT+09:00 Ingo Molnar : > > > > * Nicholas Piggin wrote: > > > >> FYI, easiest way to check if you forgot to KEEP a linker table is > >> to look at `readelf -S vmlinux` differences, and to see what is > >> being trimmed, look

Re: [RFC PATCH] x86: enable dead code and data elimination (LTO)

2017-07-09 Thread Masahiro Yamada
Hi. 2017-07-09 18:05 GMT+09:00 Ingo Molnar : > > * Nicholas Piggin wrote: > >> FYI, easiest way to check if you forgot to KEEP a linker table is >> to look at `readelf -S vmlinux` differences, and to see what is >> being trimmed, look at nm differences or use --print-gc-sections >> LD option to s

Re: [RFC PATCH] x86: enable dead code and data elimination (LTO)

2017-07-09 Thread Ingo Molnar
* Nicholas Piggin wrote: > FYI, easiest way to check if you forgot to KEEP a linker table is > to look at `readelf -S vmlinux` differences, and to see what is > being trimmed, look at nm differences or use --print-gc-sections > LD option to see what symbols you're trimming. Linker tables, > boot

[RFC PATCH] x86: enable dead code and data elimination (LTO)

2017-07-08 Thread Nicholas Piggin
Allow x86 to select DCDE option under CONFIG_EXPERT to reduce binary size. This is an RFC only for ~4.14/15 kernel. Sending as a single patch to make it easy to review and test for x86, and give other archs a base to look at. This is a _relatively_ simple and low overhead first step to getting so