]> 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)
committerDarrell Ball <dlu998@gmail.com>
Thu, 7 Sep 2017 05:27:53 +0000 (22:27 -0700)
commit4f7ad0d83b24b3f17386d36d0a5f7a00c3dce771
treedc5306dfeb1e77abfd1adddebb4d54c621f6dd7a
parent6e491fbc8026254014143e6669a01d4fcba3bd0e
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