Our supported XenServer build environments lack proper atomic libraries, which makes recent OVS techiques (ovs-rcu, cmap) painfully slow. This series adds native atomic implementations for i586 and x86_64 when compiled with GCC. This makes the atomic operations on older GCC versions as fast as on newer versions.
v3: - Elaborated memory_order_acq_rel documentation. - Relaxed "memory_order be constant" to not try to cover the case when compiling without inlining, hence removed asserts as well. In effect memory_order can be a run-time value in this case, but such compilations are not for performance in the first place. - Fixed atomic_flag to default to memory_order_seq_cst for GCC4+, and both new implementations. Jarno Rajahalme (8): Fix strict aliasing violations with GCC 4.1 and 4.4. lib/ovs-atomic: Elaborate memory_order documentation. lib/ovs-atomic: Require memory_order be constant. ovs-atomic: Fix GCC4+ atomic_flag. lib/ovs-atomic-gcc4+: Use 'volatile' to enforce memory access. tests/test-atomic: Cover more of the atomic API. lib/ovs-atomic: Native support for x86_64 with GCC. lib/ovs-atomic: Native support for 32-bit 586 with GCC. lib/automake.mk | 2 + lib/ovs-atomic-gcc4+.h | 54 ++--- lib/ovs-atomic-i586.h | 440 +++++++++++++++++++++++++++++++++++++++++ lib/ovs-atomic-x86_64.h | 346 ++++++++++++++++++++++++++++++++ lib/ovs-atomic.h | 63 +++++- ofproto/connmgr.c | 12 +- ofproto/ofproto-dpif-sflow.c | 12 +- ofproto/ofproto-dpif-upcall.c | 7 +- tests/test-atomic.c | 291 ++++++++++++++++++++++++++- vswitchd/bridge.c | 11 +- 10 files changed, 1193 insertions(+), 45 deletions(-) create mode 100644 lib/ovs-atomic-i586.h create mode 100644 lib/ovs-atomic-x86_64.h -- 1.7.10.4 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev