[adding ovs-dev, hope that's OK]

On Tue, Jun 03, 2014 at 10:19:23AM -0700, Jarno Rajahalme wrote:
> 
> On Jun 3, 2014, at 9:56 AM, Gurucharan Shetty <shet...@nicira.com> wrote:
> 
> > Hello Jarno,
> > Occasionally the cmap tests fail on Windows platform with the following o/p.
> > 
> > #tests/ovstest test-cmap check 1
> > test-cmap: lib/ovs-atomic-locked.c:49: pthread_mutex_lock failed
> > (Resource deadlock avoided)
> > 
> 
> This is now fixed in master. However, I also noticed that cmap (or
> any heavy use of ovs-rcu and/or ovs-atomic) is horribly slow with
> pthreads. This is because pthreads doesn?t have memory barriers
> (other than the locks), so lockless atomics cannot be supported with
> pthreads alone.
> 
> We should look into having more native support for MSVC atomics in
> lib/ovs-atomic.h. Depending on the level of support for C11 atomics,
> any of the existing lib/ovs-atomic-*.h files could serve as a
> starting point. I?m pretty sure a thing like ova-atomic-gcc4+.h is
> possible, since MSVC has memory barrier support.

I forgot to mention that I looked at this earlier and found a couple
of obstacles.  The main one is that MSVC doesn't have the GNU C typeof
or ({...}) extensions.  I don't see a way to implement the C11 atomics
without those and without evaluating parameters to the atomic_*()
operations more than once.  So we might have to change the interface
to require clients to tolerate multiple evaluation.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to