Re: [ACPI] ACPI mentioned on lwn.net/kernel

Jeff Garzik (jgarzik@mandrakesoft.com)
Sat, 26 Jan 2002 11:47:18 -0500


Martin Eriksson wrote:
>
> ----- Original Message -----
> From: "Jamie Lokier" <lk@tantalophile.demon.co.uk>
> To: "Linus Torvalds" <torvalds@transmeta.com>
> Cc: <linux-kernel@vger.kernel.org>
> Sent: Saturday, January 26, 2002 4:41 AM
> Subject: Re: [ACPI] ACPI mentioned on lwn.net/kernel
>
> > Linus Torvalds wrote:
> > > It's sad that gcc relegates "optimize for size" to a second-class
> > > citizen. Instead of having a "-Os" (that optimizes for size and doesn't
> > > work together with other optimizations), it would be better to have a
> > > "-Olargecode", which explicitly enables "don't care about code size" for
> > > those (few) applications where it makes sense.
> >
> > Btw, there have been suggestions that -Os may actually be faster for x86
> > code on current processors.
>
> Hmm.. I tried to compile the kernel with -Os (gcc 2.96-98) and I just got a
> ~1% smaller vmlinux and a ~3% smaller bzImage. Maybe the size optimizations
> doesn't show on these files? Internal data structures that are much bigger
> than "real" code?

That doesn't tell us much unless you benchmark any speed
improvements/degradations noticed. Hidden in that 1% may be more
favorable I-cache usage, better register usage... who knows.

It would also be interesting to compile key files like kernel/sched.c or
mm/vmscan.c in assembly using O2 and Os, and compare the output with
diff -u.

Jeff

-- 
Jeff Garzik      | "I went through my candy like hot oatmeal
Building 1024    |  through an internally-buttered weasel."
MandrakeSoft     |             - goats.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/