]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commit
Implement ST_LD_MEM_BARRIER on x86 with a locked xor
authorOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:23:31 +0000 (11:23 -0700)
committerOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:23:31 +0000 (11:23 -0700)
commit40ac04d8f3df4ea7eff9b890055fa565b368f4e3
tree5bac0ca79dbe21005ffe428229e90848422aeec2
parentdda3fcee5a7382cdbd47e2eb5cb0af3f72b9b8e3
Implement ST_LD_MEM_BARRIER on x86 with a locked xor

Microbenchmarks on modern Intel architectures show that a memory barrier
implemented with locked xor operation performs about 30% better when
compared to a barrier implemented with mfence, while providing the same
memory ordering guarantees. This patch changes the implementation of
ST_LD_MEM_BARRIER on x86 architectures to use the faster, locked xor
operation. Additionally, support for Microsoft's compiler is added.
open-vm-tools/lib/include/vm_basic_asm_x86_common.h