Re: [2.6 patch] add a config option for -Os compilation

From: Andi Kleen
Date: Sat Oct 18 2003 - 14:20:42 EST


Andrew Morton <akpm@xxxxxxxx> writes:

> And bear in mind that you can see significant changes in benchmark results
> between equivalent kernels even when the optimisation level is kept the
> same, due to aliasing and alignment luck.

It also depends on a lot on the compiler version. On 2.95
it was common wisdom that -Os is often fastest, but that changed
in later versions.

Best would be actually a mix of both - setting it case by case.
That's already done in specific cases, e.g. ACPI is always compiled
with -Os. This could be done for other files which are clearly
slow path too.

Profile feedback is unfortunately not an option because it is too
unpredictable and causes maintenance problems.

-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/