On Thu, Aug 28, 2014 at 4:39 PM, Jarno Rajahalme wrote:
>
> On Aug 28, 2014, at 9:57 AM, Gurucharan Shetty wrote:
>> diff --git a/lib/ovs-atomic-msvc.h b/lib/ovs-atomic-msvc.h
>> new file mode 100644
>> index 000..f357545
>> --- /dev/null
>> +++ b/lib/ovs-atomic-msvc.h
>> @@ -0,0 +1,370 @@
>>
81100D lock cmpxchg qword ptr [val],rcx
-Original Message-
From: dev [mailto:dev-boun...@openvswitch.org] On Behalf Of Jarno Rajahalme
Sent: Thursday, August 28, 2014 4:39 PM
To: Gurucharan Shetty
Cc: dev@openvswitch.org; Gurucharan Shetty
Subject: Re: [ovs-dev] [PATCH] ovs-atomics: Add at
On Aug 28, 2014, at 9:57 AM, Gurucharan Shetty wrote:
> diff --git a/lib/ovs-atomic-msvc.h b/lib/ovs-atomic-msvc.h
> new file mode 100644
> index 000..f357545
> --- /dev/null
> +++ b/lib/ovs-atomic-msvc.h
> @@ -0,0 +1,370 @@
> +/*
> + * Copyright (c) 2014 Nicira, Inc.
> + *
> + * Licensed und
On Thu, Aug 28, 2014 at 01:31:04PM -0700, Gurucharan Shetty wrote:
> > I'd normally expect 64-bit reads and write to be atomic when we're
> > building for x86-64:
> >> +/* 64 bit reads and write are not atomic on x86.
> Currently, we are only doing 32 bit builds. So, I put the following in
> ovs-at
> I'd normally expect 64-bit reads and write to be atomic when we're
> building for x86-64:
>> +/* 64 bit reads and write are not atomic on x86.
Currently, we are only doing 32 bit builds. So, I put the following in
ovs-atomic.h to only include this file for 32 bit builds :
...
#elif _MSC_VER && de
On Thu, Aug 28, 2014 at 09:57:42AM -0700, Gurucharan Shetty wrote:
> Before this change (i.e., with pthread locks for atomics on Windows),
> the benchmark for cmap and hmap was as follows:
>
> $ ./tests/ovstest.exe test-cmap benchmark 1000 3 1
> Benchmarking with n=1000, 3 threads, 1.00% m
Before this change (i.e., with pthread locks for atomics on Windows),
the benchmark for cmap and hmap was as follows:
$ ./tests/ovstest.exe test-cmap benchmark 1000 3 1
Benchmarking with n=1000, 3 threads, 1.00% mutations:
cmap insert: 61070 ms
cmap iterate: 2750 ms
cmap search: 14238 m