Re: [RFC] Potential problem in qspinlock due to mixed-size accesses
Andrea Parri <[email protected]>
| Newsgroups | dev.linux.lists.lkmm,org.kernel.vger.linux-arch,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <aE-3_mJPjea62anv@andrea> |
> Thanks for the praise. I expected more questioning/discussion and less > immediate acceptance :) Well, the discussion isn't closed yet. ;-) > Maybe one should also take into consideration a hypothetical extension of > LKMM to MSA. > I think LKMM (and also C11) do not preserve REL->ACQ ordering because this > would disallow their implementation as simple stores/loads on TSO. > That being said, maybe preserving "rmw;[REL];po;[ACQ]" on the > language-level would be fine and sufficient for qspinlock. On PPC say, the expression can translate to a sequence "lwsync ; lwarx ; stwcx. ; ... ; lwz ; lwsync", in which the order of the two loads is not necessarily preserved. MSAs have been on the LKMM TODO list for quite some time. I'm confident this thread will help to make some progress or at least to reinforce the interest in the topic. Andrea