Re: frame unwinder patches

From: Andi Kleen
Date: Fri Sep 05 2008 - 11:05:28 EST


> to be honest, on 64 bit the overhead is quite small (the extra
> instructions it adds are optimized for by the modern cpus that you use

The pipeline dependency stalls yes, the icache/decode overhead no.
Also CONFIG_FRAME_POINTER currently enables -fno-sibling-calls
which generates significantly worse code for a lot of common
kernel constructs.

> in the systems you're selling); on 32 bit the overhead is.. well a
> little bigger but not THAT much. yes it loses a register for the
> compiler to use, but no it's not a general purpose register, and with

%rbp is a general purpose register. In fact it's even better
than a general purpose register because it has often shorter
encoding than the other registers, but is as versatile.

> the register renaming that today's cpus do, I'd be surprised if you
> could see anything significant.

Even on modern CPUs you can measure it in macro benchmarks, at
least that was the state last time that was investigated.
On older CPUs without the magic hardware it was even more
significant. Also there are even new CPUs like Atom which don't
have the magic hardware.

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