Re: [PATCH][2.6] Allow x86_64 to reenable interrupts on contention

From: Keith Owens
Date: Tue Jul 27 2004 - 19:37:01 EST


On Tue, 27 Jul 2004 17:14:15 -0700,
William Lee Irwin III <wli@xxxxxxxxxxxxxx> wrote:
>On Tue, 27 Jul 2004, Andi Kleen wrote:
>>>> This will likely increase code size. Do you have numbers by how
>>>> much? And is it really worth it?
>
>Zwane Mwaikambo <zwane@xxxxxxxxxxxxx> wrote:
>>> Yes there is a growth;
>>> text data bss dec hex filename
>>> 3655358 1340511 486128 5481997 53a60d vmlinux-after
>>> 3648445 1340511 486128 5475084 538b0c vmlinux-before
>
>On Tue, Jul 27, 2004 at 12:01:25PM -0700, Andrew Morton wrote:
>> The growth is all in the out-of-line section, so there should be no
>> significant additional icache pressure.
>
>There are also flash and similar absolute space footprints to consider.
>Experiments seem to suggest that consolidating the lock sections and
>other spinlock code can reduce kernel image size by as much as 220KB on
>ia32 with no performance impact (rigorous benchmarks still in progress).

I consolidated the spinlock contention path to a single routine on
ia64, with big space savings. The problem with the ia64 consolidation
was backtracing through a contended lock; the ia64 unwind API is not
designed for code that is shared between multiple code paths but uses
non-standard entry and exit conventions. In the end, David Mosberger
did a patch to gcc to do lightweight calls to the out of line
contention code, just to get reliable backtraces.

kdb has workarounds for backtracing through ia64 contended locks when
the kernel is built with older versions of gcc. gdb (and hence kgdb)
has no idea about the special out of line code. Mind you, the same is
true right now with the out of line i386 code, you need special
heuristics to backtrace the existing spinlock code reliably. That will
only get worse with Zwane's patch, interrupts can now occur in the out
of line code.

Are you are planning to consolidate the out of line code for i386? Is
there a patch (even work in progress) so I can start thinking about
doing reliable backtraces?

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