]> www.infradead.org Git - users/jedix/linux-maple.git/commit
sched_ext: Do not enable LLC/NUMA optimizations when domains overlap
authorAndrea Righi <arighi@nvidia.com>
Fri, 8 Nov 2024 00:01:36 +0000 (01:01 +0100)
committerTejun Heo <tj@kernel.org>
Fri, 8 Nov 2024 00:56:39 +0000 (14:56 -1000)
commitf6ce6b949304bc7a54dbfea98402080c42bbc9a4
tree28bc6b976f3bb979fe3c4b53a339913bec61c4d7
parent860a45219bce09d9ebac883cfcf9b5b0b8a8a999
sched_ext: Do not enable LLC/NUMA optimizations when domains overlap

When the LLC and NUMA domains fully overlap, enabling both optimizations
in the built-in idle CPU selection policy is redundant, as it leads to
searching for an idle CPU within the same domain twice.

Likewise, if all online CPUs are within a single LLC domain, LLC
optimization is unnecessary.

Therefore, detect overlapping domains and enable topology optimizations
only when necessary.

Moreover, rely on the online CPUs for this detection logic, instead of
using the possible CPUs.

Fixes: 860a45219bce ("sched_ext: Introduce NUMA awareness to the default idle selection policy")
Signed-off-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/sched/ext.c