public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Keith Owens <kaos@sgi.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Linus Torvalds <torvalds@osdl.org>, Nicolas Pitre <nico@cam.org>,
	Joel Schopp <jschopp@austin.ibm.com>,
	lkml <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>,
	Arjan van de Ven <arjan@infradead.org>,
	Jes Sorensen <jes@trained-monkey.org>,
	Al Viro <viro@ftp.linux.org.uk>, Oleg Nesterov <oleg@tv-sign.ru>,
	David Howells <dhowells@redhat.com>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Christoph Hellwig <hch@infradead.org>, Andi Kleen <ak@suse.de>,
	Russell King <rmk+lkml@arm.linux.org.uk>,
	Anton Blanchard <anton@samba.org>
Subject: Re: [patch 00/21] mutex subsystem, -V14
Date: Fri, 06 Jan 2006 14:49:51 +1100	[thread overview]
Message-ID: <9675.1136519391@kao2.melbourne.sgi.com> (raw)
In-Reply-To: Your message of "Thu, 05 Jan 2006 23:43:57 BST." <20060105224357.GA30298@elte.hu>

Ingo Molnar (on Thu, 5 Jan 2006 23:43:57 +0100) wrote:
>there's one exception i think: atomic-xchg.h was pretty optimal on ARM, 
>and i'd expect it to be pretty optimal on the other atomic-swap 
>platforms too. So maybe we should specify atomic_xchg() to _not_ imply a 
>full barrier - it's a new API anyway. We cannot embedd the barrier 
>within atomic_xchg(), because the barrier is needed at different ends 
>for lock and for unlock, and adding two barriers would be unnecessary.

IA64 defines two qualifiers for cmpxchg, specifically for
distinguishing between acquiring and releasing the lock.

  cmpxchg<sz>.<sem>

<sz> is the data size, 1, 2, 4 or 8.  <sem> is one of 'acq' or 'rel'.

  sem       Ordering    Semaphore Operation
Completer   Semantics
  acq        Acquire    The memory read/write is made visible prior to
                        all subsequent data memory accesses.
  rel        Release    The memory read/write is made visible after all
                        previous data memory accesses.

cmpxchg4.acq prevents following data accesses from migrating before
taking the lock (critical R/W cannot precede critical-START).
cmpxchg4.rel prevents preceding data accesses from migrating after
releasing the lock (critical R/W cannot follow critical-END).  I
suggest adding acq and rel hints to atomic_xchg, and let architectures
that implement suitable operations use those hints.


  reply	other threads:[~2006-01-06  3:51 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-04 14:41 [patch 00/21] mutex subsystem, -V14 Ingo Molnar
2006-01-04 23:45 ` Joel Schopp
2006-01-05  2:38   ` Nicolas Pitre
2006-01-05  2:51     ` Linus Torvalds
2006-01-05  3:21       ` Nick Piggin
2006-01-05  3:39         ` Anton Blanchard
2006-01-05 18:04           ` Jesse Barnes
2006-01-05 14:40       ` Ingo Molnar
2006-01-05 16:21         ` Linus Torvalds
2006-01-05 22:03           ` Ingo Molnar
2006-01-05 22:17             ` Linus Torvalds
2006-01-05 22:43               ` Ingo Molnar
2006-01-06  3:49                 ` Keith Owens [this message]
2006-01-06  7:34           ` Denis Vlasenko
2006-01-05 14:35   ` Ingo Molnar
2006-01-05 16:42     ` Joel Schopp
2006-01-05 22:21       ` Ingo Molnar
2006-01-05 23:06         ` Joel Schopp
2006-01-05 23:26           ` Linus Torvalds
2006-01-05 23:36             ` Joel Schopp
2006-01-05 23:42               ` Ingo Molnar
2006-01-06  0:29           ` Olof Johansson
2006-01-07 17:49             ` PowerPC fastpaths for mutex subsystem Joel Schopp
2006-01-07 22:37               ` Andrew Morton
2006-01-08  7:43                 ` Anton Blanchard
2006-01-08  8:00                   ` Andrew Morton
2006-01-08  8:23                     ` Anton Blanchard
2006-01-09 11:13                     ` David Howells
2006-01-08  9:48               ` Ingo Molnar
2006-01-10 22:31                 ` Joel Schopp
2006-01-10 23:09                   ` Ingo Molnar
2006-01-11 10:52                     ` Ingo Molnar
2006-01-11 17:44                     ` Joel Schopp
2006-01-08 10:43               ` Ingo Molnar

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=9675.1136519391@kao2.melbourne.sgi.com \
    --to=kaos@sgi.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=anton@samba.org \
    --cc=arjan@infradead.org \
    --cc=dhowells@redhat.com \
    --cc=hch@infradead.org \
    --cc=jes@trained-monkey.org \
    --cc=jschopp@austin.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=nico@cam.org \
    --cc=oleg@tv-sign.ru \
    --cc=rmk+lkml@arm.linux.org.uk \
    --cc=torvalds@osdl.org \
    --cc=viro@ftp.linux.org.uk \
    /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