[ovs-dev] [PATCH v3 1/3] ofproto: Add reference count for Openflow groups.
azhou at nicira.com
Wed May 21 02:28:50 UTC 2014
> 1) Use refs for buckets (this seems unnecessarily heavyweight)
> 2) Always try bucket_lookup when adding stats to a bucket via the cache.
> If the bucket is not there in the list, we know its been removed via
> modify_group() and we simply don't update stats.
> 3) Use ofgroup->rw_lock to protect writing to stats via the xlate cache
> (this seems to break modularity in the code but it would be the simplest
> to do).
> 4) Similar to netdev, remove the group then re-add the group to ofproto
> instead of modifying the group in place. Thus, the bucket will only be
> invalid when its group parent is also invalid.
On balance, #4 seems to be the most straight forward way of dealing with it.
> Let me know if you have any other ideas. I don't particularly like any of
> these, but these are what I could come up with on the top of my head.
How about we remove the rwlock and only use ref count?
More information about the dev