>>How about we remove the rwlock and only use ref count?
>
> We need the ref count to determine when we can free the group / bucket.
> The rwlock is to serialize access to the ofgroup's properties. For
> example, 2 threads could be accessing ofgroup's properties, but a ref
> count doesn't prevent them from both editing its properties
> simultaneously. Unfortunately, I think we still need both here.
>

Which field(s) are you worried about racing in particular? The stats
fields are already
protected with a mutex. Other fields should be read only, except the
netlink message
handling path, which should create a new copy of the ofgroup object.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to