Ethan Smith <et...@ethanhs.me> added the comment:

When working on clang-cl support, I was advised here 
https://reviews.llvm.org/D47672#1131325 that we may be using hardware lock 
elision incorrectly. Copying from there:

> I also spoke to Andi Kleen here at Intel to make sure I got these inline 
> assembly versions correct. And he's not sure CPython should be using these 
> the way it is. It looks like they try to use the HLE versions anytime the 
> memory order is acquire/release. But HLE isn't suitable for every 
> acquire/release.

I believe if we just use the simple 
_InterlockedExchange/_InterlockedCompareExchange intrinsics, things should be 
safer.

----------
nosy: +Ethan Smith

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue30747>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to