[ovs-dev] [RFC 5/5] dpif-netdev: Catch reloads faster.
David Marchand
david.marchand at redhat.com
Tue Apr 30 12:18:02 UTC 2019
Looking at the reload flag only every 1024 loops can be a long time
under load, since we might be handling 32 packets per iteration, which
means 32k packets.
Look at the flag every loop, no major performance impact seen.
Signed-off-by: David Marchand <david.marchand at redhat.com>
---
lib/dpif-netdev.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 45993a3..d8018af 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -5482,7 +5482,6 @@ reload:
poll_block();
}
}
- lc = UINT_MAX;
}
pmd->intrvl_tsc_prev = 0;
@@ -5526,12 +5525,13 @@ reload:
if (!ovsrcu_try_quiesce()) {
emc_cache_slow_sweep(&((pmd->flow_cache).emc_cache));
}
+ }
- atomic_read_relaxed(&pmd->reload, &reload);
- if (reload) {
- break;
- }
+ atomic_read_relaxed(&pmd->reload, &reload);
+ if (OVS_UNLIKELY(reload)) {
+ break;
}
+
pmd_perf_end_iteration(s, rx_packets, tx_packets,
pmd_perf_metrics_enabled(pmd));
}
--
1.8.3.1
More information about the dev
mailing list