LWN.net Logo

Partial LTO?

Partial LTO?

Posted Aug 23, 2012 17:08 UTC (Thu) by rriggs (subscriber, #11598)
In reply to: Partial LTO? by jzbiciak
Parent article: Link-time optimization for the kernel

If you build and then load *any* kernel modules, it is, by definition, partial LTO.


(Log in to post comments)

Partial LTO?

Posted Aug 23, 2012 19:33 UTC (Thu) by jzbiciak (✭ supporter ✭, #5246) [Link]

Fair enough, but only at the module boundary. Isn't this the same as any DSO? I mean, it's not as if LTO is bringing in libc and all the other shared libraries your other shared libraries when you use it in user-space, is it?

The point is, to get the full benefit of LTO in the kernel, you want to be able to inline or optimize across boundaries such as arch/arm/ and kernel/, for example. (At least, if I understood correctly.) If those are both LTO'd at their respective directory boundaries, and only linked traditionally at the last step, you lose those opportunities.

Sure, drivers built as modules miss out. But, my gut feel (which may be wrong!) is that there's still plenty of things that are compiled in that ought to benefit that won't if you limit LTO to the partial link boundaries.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds