Messages in this thread Patch in this message | | | From | Ricardo Neri <> | Subject | [PATCH v2 7/7] x86/sched/itmt: Consider the idle state of SMT siblings | Date | Tue, 22 Nov 2022 12:35:32 -0800 |
| |
Cores with more than one busy SMT sibling need help from fully idle cores, even if they have lower priority. Return a priority of 0 if any of the SMT siblings of a CPU are busy. This lets lower-priority idle cores pull tasks from the CPU.
Only do this if the scheduler cares about the idle state of the siblings.
Cc: Ben Segall <bsegall@google.com> Cc: Daniel Bristot de Oliveira <bristot@redhat.com> Cc: Dietmar Eggemann <dietmar.eggemann@arm.com> Cc: Len Brown <len.brown@intel.com> Cc: Mel Gorman <mgorman@suse.de> Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Tim C. Chen <tim.c.chen@intel.com> Cc: Valentin Schneider <vschneid@redhat.com> Cc: x86@kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com> --- Changes since v1: * Introduced this patch. --- arch/x86/kernel/itmt.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kernel/itmt.c b/arch/x86/kernel/itmt.c index 2be49ce4f94a..cb22944969a1 100644 --- a/arch/x86/kernel/itmt.c +++ b/arch/x86/kernel/itmt.c @@ -169,7 +169,10 @@ void sched_clear_itmt_support(void) int arch_asym_cpu_priority(int cpu, bool check_smt) { - return per_cpu(sched_core_priority, cpu); + if (!check_smt || sched_smt_siblings_idle(cpu)) + return per_cpu(sched_core_priority, cpu); + + return 0; } /** -- 2.25.1
| |