[ovs-dev] [PATCH] ofproto-dpif-upcall: Batch upcalls.

Ben Pfaff blp at nicira.com
Tue Aug 27 22:13:49 UTC 2013


On Tue, Aug 27, 2013 at 03:04:54PM -0700, Jarno Rajahalme wrote:
> Batching reduces overheads and enables upto 4 times the upcall processing
> performance in a specialized test case.
> 
> Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>

Nice!

> +    for (n = 0; n < udpif->n_handlers; ++n) {
> +        handler = &udpif->handlers[n];
> +        if (handler->n_new_upcalls) {
> +            handler->n_new_upcalls = 0;
> +            xpthread_cond_signal(&handler->wake_cond);
> +        }

Usually there's a race if one signals a condition variable without
holding the corresponding mutex.  Did you check that there is no race
here?



More information about the dev mailing list