]> git.proxmox.com Git - mirror_ovs.git/commit
ovs-atomic-msvc: Add atomics x64 builds
authorAlin Gabriel Serdean <aserdean@ovn.org>
Tue, 5 Sep 2017 22:39:45 +0000 (01:39 +0300)
committerAlin Gabriel Serdean <aserdean@ovn.org>
Wed, 6 Sep 2017 20:35:09 +0000 (23:35 +0300)
commit574bd10f7a127f93dbdd6b591487a8bf0cbe3f41
treefcfe900590435cfc5d2469d05e20cd0646a3cb7c
parenta7dc063b440b7779f3f2169c7860f43601e64673
ovs-atomic-msvc: Add atomics x64 builds

This patch enables atomics on x64 builds.

Reuse the atomics defined for x86 and add atomics for 64 bit reads/writes.

Before this patch the cmap test gives us:
$ ./tests/ovstest.exe test-cmap benchmark 10000000 3 1
Benchmarking with n=10000000, 3 threads, 1.00% mutations, batch size 1:
cmap insert:  20100 ms
cmap iterate:  2967 ms
batch search: 10929 ms
cmap destroy: 13489 ms

cmap insert:  20079 ms
cmap iterate:  2953 ms
cmap search:  10559 ms
cmap destroy: 13486 ms

hmap insert:   2021 ms
hmap iterate:  1162 ms
hmap search:   5152 ms
hmap destroy:  1158 ms

After this change we have:
$ ./tests/ovstest.exe test-cmap benchmark 10000000 3 1
Benchmarking with n=10000000, 3 threads, 1.00% mutations, batch size 1:
cmap insert:   2953 ms
cmap iterate:   267 ms
batch search:  2193 ms
cmap destroy:  2037 ms

cmap insert:   2909 ms
cmap iterate:   267 ms
cmap search:   2167 ms
cmap destroy:  2087 ms

hmap insert:   1853 ms
hmap iterate:  1086 ms
hmap search:   4395 ms
hmap destroy:  1140 ms

We should probably revisit this file and investigate it further to see if
we can squeeze more performance.

As a side effect fix tests on x64 because usage of `ovs-atomic-pthreads.h`
is currently broken.

Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org>
Suggested-by: Ben Pfaff <blp@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
lib/ovs-atomic-msvc.h
lib/ovs-atomic.h