linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Paul Mackerras <paulus@samba.org>
Cc: akpm@linux-foundation.org,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 1/2] lib: Provide generic atomic64_t implementation
Date: Sun, 14 Jun 2009 16:04:36 +0300	[thread overview]
Message-ID: <4A34F564.2010500@redhat.com> (raw)
In-Reply-To: <18996.60235.178618.531664@cargo.ozlabs.ibm.com>

Paul Mackerras wrote:
> Avi Kivity writes:
>
>   
>> An alternative implementation using 64-bit cmpxchg will recover most of 
>> the costs of hashed spinlocks.  I assume most serious 32-bit 
>> architectures have them?
>>     
>
> Have a 64-bit cmpxchg, you mean?  x86 is the only one I know of, and
> it already has an atomic64_t implementation using cmpxchg8b (or
> whatever it's called).
>   

Yes (and it is cmpxchg8b).  I'm surprised powerpc doesn't have DCAS support.

> My thinking is that the 32-bit non-x86 architectures will be mostly
> UP, so the overhead is just an interrupt enable/restore.  Those that
> are SMP I would expect to be small SMP -- mostly just 2 cpus and maybe
> a few 4-way systems.
>   

The new Nehalems provide 8 logical threads in a single socket.  All 
those threads share a cache, and they have cmpxchg8b anyway, so this 
won't matter.

-- 
error compiling committee.c: too many arguments to function

  reply	other threads:[~2009-06-14 13:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-13  7:10 [PATCH 1/2] lib: Provide generic atomic64_t implementation Paul Mackerras
2009-06-13 20:13 ` Linus Torvalds
2009-06-13 20:25   ` Linus Torvalds
2009-06-13 20:56     ` Ingo Molnar
2009-06-14 11:53     ` Avi Kivity
2009-06-14 12:21       ` Paul Mackerras
2009-06-14 13:04         ` Avi Kivity [this message]
2009-06-15  2:44           ` Roland Dreier
2009-06-15  4:30             ` Paul Mackerras
2009-06-16 22:27           ` Gabriel Paubert
2009-06-13 21:53 ` Arnd Bergmann
2009-06-18 23:55 ` Mike Frysinger
2009-06-19  0:46   ` Benjamin Herrenschmidt
2009-06-19  0:47   ` Paul Mackerras
2009-06-19  0:49     ` Mike Frysinger

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=4A34F564.2010500@redhat.com \
    --to=avi@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    --cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).