On 12/02/2025 15:02, David Marchand wrote:
> On Wed, Feb 12, 2025 at 12:31 PM Kevin Traynor <[email protected]> wrote:
>>
>> 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;
>
> I would move this variable under the if() block later.
> But other than that, this change looks good to me.
>
I made this update and also updated the Fixes tag as this was introduced
when the loop per NUMA was added in:
46e04ec31bb2 ("dpif-netdev: Calculate per numa variance.")
Thanks David and Simon. Applied to main branch and backported as far as
branch-3.1.
> Reviewed-by: David Marchand <[email protected]>
>
>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev