On Tue, 27 Sep 2022, Tobias Burnus wrote:
> Ignoring (1), does the overall patch and this part otherwise look okay(ish)? > > > Caveat: The .sys scope works well with >= sm_60 but not does not handle > older versions. For those, the __atomic_{load/store}_n are used. I do not > see a good solution beyond documentation. In the way it is used (one > thread only setting only on/off flag, no atomic increments etc.), I think > it is unlikely to cause races without .sys scope, but as always is > difficult to rule out some special unfortunate case where it does. At > lease we do have now some documentation (in general) - which still needs > to be expanded and improved. For this feature, I did not add any wording > in this patch: until the feature is actually enabled, it would be more > confusing than helpful. If the implication is that distros will ship a racy-by-default implementation, unless they know about the problem and configure for sm_60, then no, that doesn't look fine to me. A possible solution is not enabling a feature that has a known correctness issue. Alexander