public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: David Mosberger <davidm@hpl.hp.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [Linux-ia64] cmpxchg patch
Date: Tue, 05 Feb 2002 19:22:43 +0000	[thread overview]
Message-ID: <marc-linux-ia64-105590698805990@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590698805982@msgid-missing>

>>>>> On Tue, 05 Feb 2002 01:13:47 -0600, Ray Bryant <raybry@engr.sgi.com> said:

  Ray> Also, I see that previous versions of the in-line asm spinlock
  Ray> code in IA64 used a proceudure to handle the complicated cases.

Are you referring to the "#ifdef NEW_LOCK" code?  That's supposed to
be a newer version of the spinlock code, but I haven't had time to
debug and finish it since I started working on it (probably well over
a year ago... ;-/.  I think it makes a lot of sense to handle the
contended case out of line, in a shared procedure, so you can do
back-off etc.

  Ray> However, that procedure is not part of the source tree at the
  Ray> present time.  I'm trying to do something similar to create
  Ray> NUMA aware locks that are as fast (or very nearly so) as the
  Ray> current spin locks, but have the good NUMA properties of mcs
  Ray> locks.  Any experience you have with creating spin lock code
  Ray> that calls out to a C procedure to handle the non-common cases
  Ray> would be appreciated.

The trick is to do this without forcing the "caller" to become a
non-leaf function.  I believe there are a fair number of leaf routines
which play with spinlocks and if they had to do a proper function
call, they would become non-leaf routines and this could have a
significant impact on performance.  Getting this right in the face of
potentially different compilers (and compiler versions) and kernel
unwinding is quite tricky, but it should be possible.  I'd be
interested in seeing experimentation in this area.  Like you say, the
current spinlocks are unlikely to scale well beyond moderately small
numbers of cpus.

	--david


      parent reply	other threads:[~2002-02-05 19:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-02 16:26 [Linux-ia64] cmpxchg patch Ray Bryant
2002-02-05  1:35 ` David Mosberger
2002-02-05  7:13 ` Ray Bryant
2002-02-05 19:22 ` David Mosberger [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=marc-linux-ia64-105590698805990@msgid-missing \
    --to=davidm@hpl.hp.com \
    --cc=linux-ia64@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox