Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib/ovs-atomic: Native support for 32-bit 586 with GCC.
XenServer runs OVS in dom0, which is a 32-bit VM. As the build environment lacks support for atomics, locked pthread atomics were used with considerable performance hit. This patch adds native support for ovs-atomic with 32-bit Pentium and higher CPUs, when compiled with an older GCC. We use inline asm with the cmpxchg8b instruction, which was a new instruction to Intel Pentium processors. We do not expect anyone to run OVS on 486 or older processor. cmap benchmark before the patch on 32-bit XenServer build (uses ovs-atomic-pthread): $ tests/ovstest test-cmap benchmark 2000000 8 0.1 Benchmarking with n=2000000, 8 threads, 0.10% mutations: cmap insert: 8835 ms cmap iterate: 379 ms cmap search: 6242 ms cmap destroy: 1145 ms After: $ tests/ovstest test-cmap benchmark 2000000 8 0.1 Benchmarking with n=2000000, 8 threads, 0.10% mutations: cmap insert: 711 ms cmap iterate: 68 ms cmap search: 353 ms cmap destroy: 209 ms Signed-off-by: Jarno Rajahalme <[email protected]> Acked-by: Ben Pfaff <[email protected]>
- Loading branch information