On 14 April 2014 21:04, Andy Zhou <az...@nicira.com> wrote: > > Looking closer, there are two things that this patch achieves: > > (1) Allow statistics to be attributed to two different bonds at the same > > time. > If this is the goal, should we also consider each bond have its own > read/write lock? > If reading/writing to bond state is frequent for data other than statistics, sure. I'm not sure we need to go that far at this stage.
> (2) Reduce the critical section for threads that attribute stats to the > same > > bond. > If this is the goal, should the bond_account() take a read lock > instead of write lock? > Yes, I'll fix this up. FWIW, it won't be a problem with bond mega flow, since the stats will > be attributed to > the 'hidden rules' of each post recirculation rules, bond code then > read them from > the post recirculation rules in the main thread. Your change should still help when megaflow or recirculation > are not enabled, although not the common case I measure. I see. Is the existing bond_account() codepath ever used if bond megaflow is enabled? I'll post a v2.
_______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev