Commit f1c92bd
committed
NVIDIA: SAUCE: sched/fair: Prefer fully-idle SMT cores in asym-capacity idle selection
On systems with asymmetric CPU capacity (e.g., ACPI/CPPC reporting
different per-core frequencies), the wakeup path uses
select_idle_capacity() and prioritizes idle CPUs with higher capacity
for better task placement. However, when those CPUs belong to SMT cores,
their effective capacity can be much lower than the nominal capacity
when the sibling thread is busy: SMT siblings compete for shared
resources, so a "high capacity" CPU that is idle but whose sibling is
busy does not deliver its full capacity. This effective capacity
reduction cannot be modeled by the static capacity value alone.
Introduce SMT awareness in the asym-capacity idle selection policy: when
SMT is active, always prefer fully-idle SMT cores over partially-idle
ones.
Prioritizing fully-idle SMT cores yields better task placement because
the effective capacity of partially-idle SMT cores is reduced; always
preferring them when available leads to more accurate capacity usage on
task wakeup.
On an SMT system with asymmetric CPU capacities, SMT-aware idle
selection has been shown to improve throughput by around 15-18% for
CPU-bound workloads, running an amount of tasks equal to the amount of
SMT cores.
Cc: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: Christian Loehle <christian.loehle@arm.com>
Cc: Koba Ko <kobak@nvidia.com>
Reviewed-by: K Prateek Nayak <kprateek.nayak@amd.com>
Reported-by: Felix Abecassis <fabecassis@nvidia.com>
Signed-off-by: Andrea Righi <arighi@nvidia.com>
(cherry picked from https://lore.kernel.org/all/20260428051720.3180182-1-arighi@nvidia.com)
Signed-off-by: Andrea Righi <arighi@nvidia.com>1 parent be61197 commit f1c92bd
1 file changed
Lines changed: 65 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7615 | 7615 | | |
7616 | 7616 | | |
7617 | 7617 | | |
| 7618 | + | |
| 7619 | + | |
| 7620 | + | |
| 7621 | + | |
| 7622 | + | |
| 7623 | + | |
| 7624 | + | |
| 7625 | + | |
| 7626 | + | |
| 7627 | + | |
| 7628 | + | |
| 7629 | + | |
| 7630 | + | |
| 7631 | + | |
| 7632 | + | |
| 7633 | + | |
7618 | 7634 | | |
7619 | 7635 | | |
7620 | 7636 | | |
| |||
7623 | 7639 | | |
7624 | 7640 | | |
7625 | 7641 | | |
| 7642 | + | |
7626 | 7643 | | |
7627 | | - | |
| 7644 | + | |
7628 | 7645 | | |
7629 | 7646 | | |
7630 | 7647 | | |
| |||
7636 | 7653 | | |
7637 | 7654 | | |
7638 | 7655 | | |
| 7656 | + | |
7639 | 7657 | | |
7640 | 7658 | | |
7641 | 7659 | | |
| |||
7644 | 7662 | | |
7645 | 7663 | | |
7646 | 7664 | | |
7647 | | - | |
| 7665 | + | |
7648 | 7666 | | |
7649 | 7667 | | |
7650 | 7668 | | |
7651 | 7669 | | |
7652 | 7670 | | |
7653 | 7671 | | |
7654 | 7672 | | |
| 7673 | + | |
| 7674 | + | |
| 7675 | + | |
| 7676 | + | |
| 7677 | + | |
| 7678 | + | |
| 7679 | + | |
| 7680 | + | |
| 7681 | + | |
| 7682 | + | |
| 7683 | + | |
| 7684 | + | |
| 7685 | + | |
| 7686 | + | |
| 7687 | + | |
| 7688 | + | |
| 7689 | + | |
| 7690 | + | |
| 7691 | + | |
| 7692 | + | |
| 7693 | + | |
| 7694 | + | |
| 7695 | + | |
| 7696 | + | |
7655 | 7697 | | |
7656 | 7698 | | |
7657 | | - | |
| 7699 | + | |
7658 | 7700 | | |
7659 | 7701 | | |
7660 | 7702 | | |
| |||
7665 | 7707 | | |
7666 | 7708 | | |
7667 | 7709 | | |
| 7710 | + | |
| 7711 | + | |
| 7712 | + | |
| 7713 | + | |
| 7714 | + | |
| 7715 | + | |
| 7716 | + | |
| 7717 | + | |
| 7718 | + | |
| 7719 | + | |
| 7720 | + | |
| 7721 | + | |
| 7722 | + | |
7668 | 7723 | | |
7669 | 7724 | | |
7670 | 7725 | | |
| |||
7673 | 7728 | | |
7674 | 7729 | | |
7675 | 7730 | | |
7676 | | - | |
| 7731 | + | |
7677 | 7732 | | |
7678 | 7733 | | |
7679 | 7734 | | |
| 7735 | + | |
| 7736 | + | |
| 7737 | + | |
7680 | 7738 | | |
7681 | | - | |
| 7739 | + | |
| 7740 | + | |
| 7741 | + | |
7682 | 7742 | | |
7683 | 7743 | | |
7684 | 7744 | | |
| |||
0 commit comments