[ovs-dev] [thread-safety 08/11] mac-learning: Make the mac-learning module thread safe.

Ethan Jackson ethan at nicira.com
Thu Aug 1 19:26:03 UTC 2013


> I actually like data structures that are locked externally, when it is
> possible, because it gives additional flexibility.  You can, for
> example, implement multi-object transactions without additional cost,
> or you can leave out the locking entirely if it isn't needed.  In the
> past, I've ordinarily seen this done by putting the lock itself
> outside the data structure, since for a data structure with multiple
> purposes you might want to lock it differently, or not at all.  For
> example, lswitch is only used from the single threaded ovs-controller
> program, so it doesn't really need any lock at all.  OTOH, it will be
> harder to take advantage of the clang annotations if only some users
> lock, and there's no real penalty to ovs-controller.

All this sounds reasonable.  We're going to have a couple months of
experimentation around this stuff until we settle on a style that
works for us.

At any rate thanks for the reviews, I'll merge this series.

Ethan
X-CudaMail-Whitelist-To: dev at openvswitch.org



More information about the dev mailing list