> 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@openvswitch.org
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to