[ovs-dev] [PATCH v3] dpif-netdev: Remove PMD latency on seq_mutex

Flavio Leitner fbl at redhat.com
Tue Jul 5 19:04:04 UTC 2016


On Mon, Jul 04, 2016 at 03:48:30AM -0700, Jarno Rajahalme wrote:
> 
> > On Jun 29, 2016, at 4:58 PM, Flavio Leitner <fbl at redhat.com> wrote:
> > 
> > On Wed, Jun 29, 2016 at 05:04:06AM -0700, Jarno Rajahalme wrote:
> >> 
> >>> On Jun 23, 2016, at 11:40 AM, Flavio Leitner <fbl at redhat.com> wrote:
> >>> 
> ...
> > 
> >>> +
> >>> +    ovs_assert(!single_threaded());
> >>> +    perthread = ovsrcu_perthread_get();
> >> 
> >> Is there a particular reason not to do also these only when the locking succeeds? E.g., 
> > 
> > The reason was to not hold the lock more than needed even
> > though the above lines should be fast enough today. Are you
> > saying that the code looks significantly better if we try
> > locking first at the beginning?
> 
> I guess in addition to aesthetics my thinking was not to do
> unnecessary things if the locking does not succeed, but your design
> argument is better, especially when we expect the locking to succeed
> most of the time.

I sent the v4 with the return code fixed:
http://openvswitch.org/pipermail/dev/2016-July/074505.html
Thanks for your review!
fbl



More information about the dev mailing list