From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: Paul Mackerras <paulus@samba.org>
Cc: linux-arch@vger.kernel.org, mingo@elte.hu
Subject: Re: [patch 1/2] Directed yield: cpu_relax variants for spinlocks and rw-locks.
Date: Fri, 15 Sep 2006 14:06:07 +0200 [thread overview]
Message-ID: <1158321967.23993.15.camel@localhost> (raw)
In-Reply-To: <17674.38270.541900.580212@cargo.ozlabs.ibm.com>
On Fri, 2006-09-15 at 21:58 +1000, Paul Mackerras wrote:
> > In order to implement a spinlock that yields the cpu in favour of
> > the current lock holder cpu_relax variants for spinlocks and
> > read/write locks are needed. The new _raw_spin_relax, _raw_read_relax
> > and _raw_write_relax primitives have an additional argument: the
> > pointer to the lock structure.
>
> This will be useful on powerpc as well. We need:
>
> #define _raw_spin_relax(lock) __spin_yield(lock)
> #define _raw_read_relax(lock) __rw_yield(lock)
> #define _raw_write_relax(lock) __rw_yield(lock)
>
> in order to define your new primitives in terms of what we already
> have defined in asm-powerpc/spinlock.h.
Ahh, I haven't seen that powerpc already has a __spin_yield. I'll change
the patch accordingly.
--
blue skies,
Martin.
Martin Schwidefsky
Linux for zSeries Development & Services
IBM Deutschland Entwicklung GmbH
"Reality continues to ruin my life." - Calvin.
prev parent reply other threads:[~2006-09-15 12:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-15 11:30 [patch 1/2] Directed yield: cpu_relax variants for spinlocks and rw-locks Martin Schwidefsky
2006-09-15 11:58 ` Paul Mackerras
2006-09-15 12:06 ` Martin Schwidefsky [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=1158321967.23993.15.camel@localhost \
--to=schwidefsky@de.ibm.com \
--cc=linux-arch@vger.kernel.org \
--cc=mingo@elte.hu \
--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.