Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

sched/fair: Don't double balance_interval for migrate_misfit

It is not necessarily an indication of the system being busy and
requires a backoff of the load balancer activities. But pushing it high
could mean generally delaying other misfit activities or other type of
imbalances.

Also don't pollute nr_balance_failed because of misfit failures. The
value is used for enabling cache hot migration and in migrate_util/load
types. None of which should be impacted (skewed) by misfit failures.

Signed-off-by: Qais Yousef <qyousef@layalina.io>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
Link: https://lore.kernel.org/r/20240324004552.999936-5-qyousef@layalina.io

authored by

Qais Yousef and committed by
Ingo Molnar
58eeb2d7 fa427e8e

+11 -2
+11 -2
kernel/sched/fair.c
··· 11449 11449 * We do not want newidle balance, which can be very 11450 11450 * frequent, pollute the failure counter causing 11451 11451 * excessive cache_hot migrations and active balances. 11452 + * 11453 + * Similarly for migration_misfit which is not related to 11454 + * load/util migration, don't pollute nr_balance_failed. 11452 11455 */ 11453 - if (idle != CPU_NEWLY_IDLE) 11456 + if (idle != CPU_NEWLY_IDLE && 11457 + env.migration_type != migrate_misfit) 11454 11458 sd->nr_balance_failed++; 11455 11459 11456 11460 if (need_active_balance(&env)) { ··· 11537 11533 * repeatedly reach this code, which would lead to balance_interval 11538 11534 * skyrocketing in a short amount of time. Skip the balance_interval 11539 11535 * increase logic to avoid that. 11536 + * 11537 + * Similarly misfit migration which is not necessarily an indication of 11538 + * the system being busy and requires lb to backoff to let it settle 11539 + * down. 11540 11540 */ 11541 - if (env.idle == CPU_NEWLY_IDLE) 11541 + if (env.idle == CPU_NEWLY_IDLE || 11542 + env.migration_type == migrate_misfit) 11542 11543 goto out; 11543 11544 11544 11545 /* tune up the balancing interval */