[ovs-dev] [RFC 08/10] ofproto-dpif: Use new ovs-thread-stats for rule_dpif stats

Ben Pfaff blp at nicira.com
Sat Oct 11 00:23:46 UTC 2014


On Fri, Oct 10, 2014 at 10:15:26PM +0000, Daniele Di Proietto wrote:
> On 10/10/14, 9:47 AM, "Ben Pfaff" <blp at nicira.com> wrote:
> 
> >On Wed, Oct 08, 2014 at 02:09:54PM -0700, Daniele Di Proietto wrote:
> >> Signed-off-by: Daniele Di Proietto <ddiproietto at vmware.com>
> >
> >Do you have any ideas on how to make the new thread stats code a little
> >more flexible, so that the awkward special case for clearing only some
> >stats in this patch can be avoided?  One idea would be to parameterize
> >the part of the stats structure that gets cleared by clear(),
> >e.g. provide an offset and length.
> 
> I didn't think of that, but it would require to store the offset and
> length into each bucket and maybe use atomic compare exchange to set them.
> I do not see any other way of doing it. Do you think it will be a good
> solution?

Do we need to do more than one kind of clearing for a single kind of
thread stats?  If not, then the offset and length do not need anything
special.  Maybe I do not understand the problem yet.



More information about the dev mailing list