Re: [PATCH] kbuild: reuse vmlinux.o in vmlinux_link

2020-06-15 Thread Masahiro Yamada
On Tue, Jun 16, 2020 at 6:47 AM Sami Tolvanen wrote: > > On Sat, May 23, 2020 at 8:13 AM Masahiro Yamada wrote: > > > > Hi Nicholas, > > (+CC: Sam Ravnborg) > > > > > > On Sat, May 23, 2020 at 7:06 PM Nicholas Piggin wrote: > > > > > > Excerpts from Masahiro Yamada's message of May 23, 2020 3:44

Re: [PATCH] kbuild: reuse vmlinux.o in vmlinux_link

2020-06-15 Thread Sami Tolvanen
On Sat, May 23, 2020 at 8:13 AM Masahiro Yamada wrote: > > Hi Nicholas, > (+CC: Sam Ravnborg) > > > On Sat, May 23, 2020 at 7:06 PM Nicholas Piggin wrote: > > > > Excerpts from Masahiro Yamada's message of May 23, 2020 3:44 am: > > > + Michael, and PPC ML. > > > > > > They may know something abou

Re: [PATCH] kbuild: reuse vmlinux.o in vmlinux_link

2020-05-24 Thread Masahiro Yamada
Hi Sam, Thanks for the comments. On Sun, May 24, 2020 at 1:54 AM Sam Ravnborg wrote: > > Hi Masahiro. > > On Sun, May 24, 2020 at 12:12:35AM +0900, Masahiro Yamada wrote: > > Hi Nicholas, > > (+CC: Sam Ravnborg) > > > > > > On Sat, May 23, 2020 at 7:06 PM Nicholas Piggin wrote: > > > > > > Exce

Re: [PATCH] kbuild: reuse vmlinux.o in vmlinux_link

2020-05-23 Thread Sam Ravnborg
Hi Masahiro. On Sun, May 24, 2020 at 12:12:35AM +0900, Masahiro Yamada wrote: > Hi Nicholas, > (+CC: Sam Ravnborg) > > > On Sat, May 23, 2020 at 7:06 PM Nicholas Piggin wrote: > > > > Excerpts from Masahiro Yamada's message of May 23, 2020 3:44 am: > > > + Michael, and PPC ML. > > > > > > They

Re: [PATCH] kbuild: reuse vmlinux.o in vmlinux_link

2020-05-23 Thread Masahiro Yamada
Hi Nicholas, (+CC: Sam Ravnborg) On Sat, May 23, 2020 at 7:06 PM Nicholas Piggin wrote: > > Excerpts from Masahiro Yamada's message of May 23, 2020 3:44 am: > > + Michael, and PPC ML. > > > > They may know something about the reason of failure. > > Because the linker can't put branch stubs withi

Re: [PATCH] kbuild: reuse vmlinux.o in vmlinux_link

2020-05-23 Thread Nicholas Piggin
Excerpts from Masahiro Yamada's message of May 23, 2020 3:44 am: > + Michael, and PPC ML. > > They may know something about the reason of failure. Because the linker can't put branch stubs within object code sections, so when you incrementally link them too large, the linker can't resolve branc

Re: [PATCH] kbuild: reuse vmlinux.o in vmlinux_link

2020-05-22 Thread Masahiro Yamada
On Fri, May 22, 2020 at 7:08 AM Kees Cook wrote: > > On Thu, May 21, 2020 at 01:27:16PM -0700, Sami Tolvanen wrote: > > Instead of linking all compilation units again each time vmlinux_link is > > called, reuse vmlinux.o from modpost_link. > > > > With x86_64 allyesconfig, vmlinux_link is called t

Re: [PATCH] kbuild: reuse vmlinux.o in vmlinux_link

2020-05-22 Thread Masahiro Yamada
+ Michael, and PPC ML. They may know something about the reason of failure. On Sat, May 23, 2020 at 2:41 AM Masahiro Yamada wrote: > > On Fri, May 22, 2020 at 5:27 AM Sami Tolvanen wrote: > > > > Instead of linking all compilation units again each time vmlinux_link is > > called, reuse vmlinux

Re: [PATCH] kbuild: reuse vmlinux.o in vmlinux_link

2020-05-22 Thread Masahiro Yamada
On Fri, May 22, 2020 at 5:27 AM Sami Tolvanen wrote: > > Instead of linking all compilation units again each time vmlinux_link is > called, reuse vmlinux.o from modpost_link. > > With x86_64 allyesconfig, vmlinux_link is called three times and reusing > vmlinux.o reduces the build time ~38 seconds

Re: [PATCH] kbuild: reuse vmlinux.o in vmlinux_link

2020-05-21 Thread Kees Cook
On Thu, May 21, 2020 at 01:27:16PM -0700, Sami Tolvanen wrote: > Instead of linking all compilation units again each time vmlinux_link is > called, reuse vmlinux.o from modpost_link. > > With x86_64 allyesconfig, vmlinux_link is called three times and reusing > vmlinux.o reduces the build time ~38

Re: [PATCH] kbuild: reuse vmlinux.o in vmlinux_link

2020-05-21 Thread Kees Cook
On Thu, May 21, 2020 at 01:27:16PM -0700, Sami Tolvanen wrote: > Instead of linking all compilation units again each time vmlinux_link is > called, reuse vmlinux.o from modpost_link. > > With x86_64 allyesconfig, vmlinux_link is called three times and reusing > vmlinux.o reduces the build time ~38

[PATCH] kbuild: reuse vmlinux.o in vmlinux_link

2020-05-21 Thread Sami Tolvanen
Instead of linking all compilation units again each time vmlinux_link is called, reuse vmlinux.o from modpost_link. With x86_64 allyesconfig, vmlinux_link is called three times and reusing vmlinux.o reduces the build time ~38 seconds on my system (59% reduction in the time spent in vmlinux_link).