[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1203687654.6242.22.camel@lappy>
Date: Fri, 22 Feb 2008 14:40:54 +0100
From: Peter Zijlstra <a.p.zijlstra@...llo.nl>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: gregory.haskins@...il.com, Gregory Haskins <ghaskins@...ell.com>,
mingo@...e.hu, tglx@...utronix.de, linux-rt-users@...r.kernel.org,
linux-kernel@...r.kernel.org, bill.huey@...il.com,
kevin@...man.org, cminyard@...sta.com, dsingleton@...sta.com,
dwalker@...sta.com, npiggin@...e.de, dsaxena@...xity.net,
ak@...e.de, gregkh@...e.de, sdietrich@...ell.com,
pmorreale@...ell.com, mkohari@...ell.com
Subject: Re: [PATCH [RT] 05/14] rearrange rt_spin_lock sleep
On Fri, 2008-02-22 at 08:35 -0500, Steven Rostedt wrote:
> > My assumption is that the xchg() (inside update_current()) acts as an
> > effective wmb(). If xchg() does not have this property, then this code
> > is broken and patch 6/14 should also add a:
> >
> >
> > + smp_wmb();
>
> I believe that the wmb would be needed. I doubt that xchg on all archs
> would force any ordering of reads and writes. It only needs to guarantee the
> atomic nature of the data exchange. I don't see any reason that it would
> imply any type of memory barrier.
Documentation/memory-barriers.txt states:
Any atomic operation that modifies some state in memory and returns information
about the state (old or new) implies an SMP-conditional general memory barrier
(smp_mb()) on each side of the actual operation (with the exception of
explicit lock operations, described later). These include:
xchg();
--
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