In the case where there is a NUMA node that has a zero variance
improvement, the log will report it's variance improvement as value for
a previous NUMA node with a non-zero variance improvement.
For example in an artificial case:
|dpif_netdev|DBG|Numa node 1. Current variance 1000 Estimated variance 0.
Variance improvement 100%.
^^^ correct value
|dpif_netdev|DBG|Numa node 0. Current variance 0 Estimated variance 0.
Variance improvement 100%.
^^^ incorrect value for Numa 0, value from Numa 1
This is caused by not resetting the improvement between loops.
This is a debug log reporting issue only, non-zero variance improvement
will still trigger rebalance where appropriate.
Move improvement and other variables into the loop code block to fix
logs.
Fixes: 58fed7e8d8e8 ("dpif-netdev: Make PMD auto load balance use common rxq
scheduling.")
Reported-at: https://issues.redhat.com/browse/FDP-1145
Signed-off-by: Kevin Traynor <[email protected]>
---
lib/dpif-netdev.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index b572fab23..d51d4d540 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -6519,8 +6519,6 @@ pmd_rebalance_dry_run(struct dp_netdev *dp)
struct sched_numa_list numa_list_cur;
struct sched_numa_list numa_list_est;
+ struct sched_numa *numa_cur;
bool thresh_met = false;
- uint64_t current_var, estimate_var;
- struct sched_numa *numa_cur, *numa_est;
- uint64_t improvement = 0;
VLOG_DBG("PMD auto load balance performing dry run.");
@@ -6541,4 +6539,8 @@ pmd_rebalance_dry_run(struct dp_netdev *dp)
/* Calculate variances. */
HMAP_FOR_EACH (numa_cur, node, &numa_list_cur.numas) {
+ uint64_t current_var, estimate_var;
+ struct sched_numa *numa_est;
+ uint64_t improvement = 0;
+
numa_est = sched_numa_list_lookup(&numa_list_est,
numa_cur->numa_id);
--
2.48.1
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev