lkml.org 
[lkml]   [2018]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] tools/memory-model: Add write ordering by release-acquire and by locks
> > > I also just realised that this prevents Power from using ctrl+isync to
> > > implement acquire, should they wish to do so.
> >
> > They in fact do so on chips lacking LWSYNC, see how PPC_ACQUIRE_BARRIER
> > (as used by atomic_*_acquire) turns into ISYNC (note however that they
> > do not use PPC_ACQUIRE_BARRIER for smp_load_acquire -- because there's
> > no CTRL there).
>
> Right, so the example in the commit message is broken on PPC then. I think
> it's also broken on RISC-V, despite the claim.

I agree for RISC-V (and I missed it in my earlier review): the 2nd
snippet from the commit message would map to something like

fence rw, w
STORE #1,[x]
LOAD [x]
fence r ,rw
STORE #1,[y]

and there would be no guarantee that the stores to x and y will be
propagated in program order to another CPU, AFAICT. Thank you for
pointing this out.

Andrea

\
 
 \ /
  Last update: 2018-06-22 13:26    [W:0.083 / U:0.860 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site