[ovs-dev] [PATCH v2] ovs-atomic-msvc: Add atomics x64 builds
Ben Pfaff
blp at ovn.org
Wed Sep 6 16:05:53 UTC 2017
On Wed, Sep 06, 2017 at 01:39:45AM +0300, Alin Gabriel Serdean wrote:
> 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 at ovn.org>
> Suggested-by: Ben Pfaff <blp at ovn.org>
> ---
> v2: Change commit message.
> ---
> lib/ovs-atomic-msvc.h | 12 ++++++++++++
> lib/ovs-atomic.h | 2 +-
> 2 files changed, 13 insertions(+), 1 deletion(-)
Nice and simple.
Acked-by: Ben Pfaff <blp at ovn.org>
More information about the dev
mailing list