[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0612061126010.3542@woody.osdl.org>
Date: Wed, 6 Dec 2006 11:28:17 -0800 (PST)
From: Linus Torvalds <torvalds@...l.org>
To: Christoph Lameter <clameter@....com>
cc: Russell King <rmk+lkml@....linux.org.uk>,
David Howells <dhowells@...hat.com>, akpm@...l.org,
linux-arm-kernel@...ts.arm.linux.org.uk,
linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org
Subject: Re: [PATCH] WorkStruct: Implement generic UP cmpxchg() where an arch
doesn't support it
On Wed, 6 Dec 2006, Christoph Lameter wrote:
>
> > For CPUs with load locked + store conditional, it is expensive.
>
> Because it locks the bus? I am not that familiar with those architectures
> but it seems that those will have a general problem anyways.
load_locked + store_conditional should _not_ be any more expensive than
any atomic sequence will always be.
Atomic sequences in SMP are obviously never "cheap". But cmpxchg shouldn't
be any more expensive than any other atomic sequence if you have
load-locked and store-conditional.
There are obviously _implementation_ bugs. The early alpha's had such an
atrocious ldl/stc that it wasn't even funny. That might be true in other
implementations too, but it's definitely not cmpxchg-specific if so. It
will affect _any_ atomic ops on such an architecture (atomic_inc() and
friends)
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists