All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keith Owens <kaos@sgi.com>
To: Paul Mackerras <paulus@samba.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Un-inline spinlocks on ppc64
Date: Mon, 10 May 2004 11:34:42 +1000	[thread overview]
Message-ID: <2515.1084152882@kao2.melbourne.sgi.com> (raw)
In-Reply-To: Your message of "Mon, 10 May 2004 10:11:33 +1000." <16542.51381.215308.485006@cargo.ozlabs.ibm.com>

On Mon, 10 May 2004 10:11:33 +1000, 
Paul Mackerras <paulus@samba.org> 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.

pfm_record_sample()
{
	...
#ifdef CONFIG_SMP
        extern char ia64_spinlock_contention[], ia64_spinlock_contention_end[];
#endif
	...
        h->ip   = regs ? regs->cr_iip | ((regs->cr_ipsr >> 41) & 0x3): 0x0UL;
#ifdef CONFIG_SMP
        if (h->ip >= (unsigned long)ia64_spinlock_contention &&
                        h->ip < (unsigned long)ia64_spinlock_contention_end)
                h->ip = regs->r28;
#endif
	...
}


      parent reply	other threads:[~2004-05-10  1:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-10  0:11 [PATCH] Un-inline spinlocks on ppc64 Paul Mackerras
2004-05-10  0:20 ` Andrew Morton
2004-05-10  0:31   ` Zwane Mwaikambo
2004-05-10  0:41     ` Matt Mackall
2004-05-10  1:34 ` Keith Owens [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2515.1084152882@kao2.melbourne.sgi.com \
    --to=kaos@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.