Re: [RFC PATCH 0/6] sched/fair: Introduce the SMT_BUDDY_ASSIST feature
From: Tim Chen
Date: Thu Oct 22 2026 - 16:26:31 EST
On Tue, 2026-10-20 at 16:37 +0800, Li kunyu wrote:
> [Background]
>
> In high-performance computing (HPC) and cloud computing scenarios,
> maximizing overall compute throughput and sustaining peak CPU capacity
> remain critical optimization goals. Within the scheduling domain, the
> primary optimization focuses include:
>
> 1. Timely responsiveness for task wakeup and execution startup.
>
> 2. Fast and balanced distribution of CPU utilization across cores.
>
> 3. Preferring task migration within shared-cache domains (e.g., L3)
> before burst workloads arrive, so as to reduce cross-die or
> cross-node overhead.
>
> During development, the following issues were encountered. The above
> approach ultimately yielded measurable performance improvements.
>
>
> [Problem]
>
> It was found that on servers equipped with the Hygon 7447v CPU (Model 7,
> 384 logical cores), migrating tasks across LLC scheduling domains during
> load balancing caused significant performance degradation:
>
> 1. A low L3 cache hitting rate (due to factors such as non-shared L3
> caches).
>
> 2. The traversal overhead of higher-level scheduling domains (e.g.,
> cross-NUMA scheduling domains).
>
> Similar issues were also observed on CPUs from other vendors during
> testing, though the degree of memory bandwidth increase and other
> latency effects varied. Consequently, a series of patches was developed
> to address and improve these issues.
>
>
> [Solution]
>
> This RFC patch series introduces the SMT_BUDDY_ASSIST scheduling
> feature. The main work is as follows:
>
> 1. Push CFS tasks to SMT sibling CPUs during periodic load balancing.
>
> 2. Skip SMT-domain balancing after a successful push and avoid pulling
> the pushed task back.
>
> 3. Restrict newidle balancing so it does not pull from higher-level
> scheduling domains.
Kunyu,
Have you tried to set relax_domain_level= in boot parameter to
prevent new idle balance across NUMA nodes?
grep . /sys/kernel/debug/sched/domains/cpu0/domain*/{name,level,flags}
to find the right level for NUMA and also if the SD_BALANCE_NEWIDLE
is turned off for NUMA after you set relax_domain_level.
Wonder how much this will improve things for you.
Thanks.
Tim