Re: [PATCH] Un-inline spinlocks on ppc64

From: Keith Owens
Date: Sun May 09 2004 - 20:37:00 EST

On Mon, 10 May 2004 10:11:33 +1000,
Paul Mackerras <paulus@xxxxxxxxx> wrote:
>The one problem with out-of-line spinlock routines is that lock
>contention will show up in profiles in the spin_lock etc. routines
>rather than in the callers, as it does with inline spinlocks. I have
>added a CONFIG_INLINE_SPINLOCKS config option for people that want to
>do profiling. In the longer term, Anton is talking about teaching the
>profiling code to attribute samples in the spin lock routines to the
>routine's caller.

If it is any help, SGI patched the ia64 perfmon code to cope with a 2.4
version of the out of line spinlock patch. The ia64 code uses a
non-standard calling sequence to work around a bug in gcc prior to 3.4,
r28 is the return address for the out of line code.

extern char ia64_spinlock_contention[], ia64_spinlock_contention_end[];
h->ip = regs ? regs->cr_iip | ((regs->cr_ipsr >> 41) & 0x3): 0x0UL;
if (h->ip >= (unsigned long)ia64_spinlock_contention &&
h->ip < (unsigned long)ia64_spinlock_contention_end)
h->ip = regs->r28;

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at