[ovs-dev] [PATCH] [PATCH] rcu: reduce RCU block time
Lilijun
jerry.lilijun at huawei.com
Fri Dec 7 06:03:27 UTC 2018
When calling ovsrcu_synchronize(), it always block 1000ms because we poll
block until elapsed time become greater than
warning_threshold(1000).That's too long for some configuration commands.
So this patch reduces warning_threshold's default value to 100 and print
logs after it have elapsed more than 1000ms.
Signed-off-by: Lilijun <jerry.lilijun at huawei.com>
---
lib/ovs-rcu.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/lib/ovs-rcu.c b/lib/ovs-rcu.c
index ebc8120..af52cc5 100644
--- a/lib/ovs-rcu.c
+++ b/lib/ovs-rcu.c
@@ -191,7 +191,7 @@ ovsrcu_is_quiescent(void)
void
ovsrcu_synchronize(void)
{
- unsigned int warning_threshold = 1000;
+ unsigned int warning_threshold = 100;
uint64_t target_seqno;
long long int start;
@@ -226,8 +226,10 @@ ovsrcu_synchronize(void)
elapsed = time_msec() - start;
if (elapsed >= warning_threshold) {
- VLOG_WARN("blocked %u ms waiting for %s to quiesce",
- elapsed, stalled_thread);
+ if (warning_threshold >= 1000) {
+ VLOG_WARN("blocked %u ms waiting for %s to quiesce",
+ elapsed, stalled_thread);
+ }
warning_threshold *= 2;
}
poll_timer_wait_until(start + warning_threshold);
--
1.8.4.msysgit.0
More information about the dev
mailing list