Hey Ben, Just found, this patch needs a review,
Could you take a look~? Thanks, Alex Wang, On Mon, Dec 29, 2014 at 4:06 PM, Alex Wang <al...@nicira.com> wrote: > This commit makes handler threads always call poll_block() at > the end of each handling cycle. If there are upcalls received > in the current cycle, the handler will register to wake up > immediately. Otherwise, it will wait on both the netlink > socket and the exit latch. > > Calling poll_block() at every handling cycle makes sure that > coverage counter stats are always timely attributed, and that > the execution of ovsrcu-postponed events is not held by any > busy handler thread. > > Signed-off-by: Alex Wang <al...@nicira.com> > --- > ofproto/ofproto-dpif-upcall.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c > index 8577b0e..193e6b7 100644 > --- a/ofproto/ofproto-dpif-upcall.c > +++ b/ofproto/ofproto-dpif-upcall.c > @@ -526,8 +526,9 @@ udpif_upcall_handler(void *arg) > if (!n_upcalls) { > dpif_recv_wait(udpif->dpif, handler->handler_id); > latch_wait(&udpif->exit_latch); > - poll_block(); > } else { > + poll_immediate_wake(); > + > handle_upcalls(handler, &misses, upcalls, n_upcalls); > > HMAP_FOR_EACH (miss, hmap_node, &misses) { > @@ -539,7 +540,7 @@ udpif_upcall_handler(void *arg) > ofpbuf_uninit(&upcalls[i].upcall_buf); > } > } > - coverage_clear(); > + poll_block(); > } > hmap_destroy(&misses); > > -- > 1.7.9.5 > > _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev