Re: [PATCH x86] [15/16] Force __cpuinit on for CONFIG_PM without HOTPLUG_CPU
From: Andi Kleen
Date: Tue Jan 15 2008 - 13:26:22 EST
On Tue, Jan 15, 2008 at 07:21:42PM +0100, Sam Ravnborg wrote:
> With default options to gcc my .config produces ~65 warnings
> but with -fno-unit-a-time I get 112 warnings.
> Solely due to less inlining done by gcc.
>
> So there are two sources for the 'randomization':
> a) The actual config
> b) The sometimes agressive inlining
Inlining should not be random. And how does inlining cause such a warning?
>
> a) will be addressed by having separate sections for each
> __init* type that is at link time combined where it belongs.
One problem I ran into the past was that older binutils seem
to have some exponential behaviour with a lot of named sections
and run very slowly.
>
> b) is addressed by a Kernel Hacking option which
> 1) uses -fno-unit-at-a-time to get less gcc inlining
> 2) maybe make all __*init function no-inline
> 3) maybe disable inlining globally
>
> > > And I will add a config option to:
> > > - set -fno-unit-at-a-time
> >
> > I was told future gcc versions would remove that. Why do you
> > want it?
> Are there any better way to tell gcc no to inline so agressively?
You can either sprinkle noinlines or set specific --params to throttle
back the inliner. The later is very gcc version specific unfortunately.
-Andi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/