diff options
author | Mark Michelson <mmichels@redhat.com> | 2018-04-11 09:15:22 -0500 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2018-04-13 10:57:02 -0700 |
commit | 0f3d9fb4853199d66caa1a32ee16a7e5a36d8a84 (patch) | |
tree | 7bd171d5b2a07c3559266f21a5f215d33e60fa9d | |
parent | 99cc5c921d4740da21b9de1f55077ec03f33f8d7 (diff) | |
download | openvswitch-0f3d9fb4853199d66caa1a32ee16a7e5a36d8a84.tar.gz |
stopwatch: Add latch_poll to stopwatch loop.
Nothing was clearing the latch, so the loop was busy. This makes it so
the loop only runs on new calls to latch_set() by a separate thread.
Signed-off-by: Mark Michelson <mmichels@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
-rw-r--r-- | lib/stopwatch.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/stopwatch.c b/lib/stopwatch.c index bd40434af..20e2eefc0 100644 --- a/lib/stopwatch.c +++ b/lib/stopwatch.c @@ -429,6 +429,7 @@ stopwatch_thread(void *ign OVS_UNUSED) struct ovs_list command_list; struct stopwatch_packet *pkt; + latch_poll(&stopwatch_latch); guarded_list_pop_all(&stopwatch_commands, &command_list); ovs_mutex_lock(&stopwatches_lock); LIST_FOR_EACH_POP (pkt, list_node, &command_list) { |