On Thu, Aug 13, 2015 at 11:48:49AM -0700, Alex Wang wrote:
> For performance-critical threads like pmd threads, we currently make them
> never call coverage_clear() to avoid contention over the global mutex
> 'coverage_mutex'.  So, even though pmd thread still keeps updating their
> thread-local coverage count, the count is never attributed to the global
> total.  But it is useful to have them available.
> 
> This commit makes this happen by implementing a non-contending version
> of the clear function, coverage_try_clear().  The function will use
> the ovs_mutex_trylock() and return immediately if the mutex cannot
> be acquired.  Since threads like pmd thread are always busy-looping,
> the lock will eventually be acquired.
> 
> Requested-by: Ilya Maximets <i.maxim...@samsung.com>
> Signed-off-by: Alex Wang <al...@nicira.com>

This seems like an improvement.  I can imagine better data structures
but I don't know whether they're worthwhile.

Acked-by: Ben Pfaff <b...@nicira.com>
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to