[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f341531d-d65d-4063-9b0c-8d47b49864db@amd.com>
Date: Tue, 23 Sep 2025 14:12:17 +0530
From: K Prateek Nayak <kprateek.nayak@....com>
To: Fernand Sieber <sieberf@...zon.com>, <mingo@...hat.com>,
<peterz@...radead.org>
CC: <linux-kernel@...r.kernel.org>, <juri.lelli@...hat.com>,
<vincent.guittot@...aro.org>, <dietmar.eggemann@....com>,
<rostedt@...dmis.org>, <bsegall@...gle.com>, <mgorman@...e.de>,
<bristot@...hat.com>, <vschneid@...hat.com>, <dwmw@...zon.co.uk>,
<jschoenh@...zon.de>, <liuyuxua@...zon.com>
Subject: Re: [PATCH 1/4] sched/fair: Fix cookie check on __select_idle_cpu()
Hello Fernand,
On 9/22/2025 6:09 PM, Fernand Sieber wrote:
> @@ -7447,7 +7447,7 @@ static inline int sched_balance_find_dst_cpu(struct sched_domain *sd, struct tas
> static inline int __select_idle_cpu(int cpu, struct task_struct *p)
> {
> if ((available_idle_cpu(cpu) || sched_idle_cpu(cpu)) &&
> - sched_cpu_cookie_match(cpu_rq(cpu), p))
> + sched_core_cookie_match(cpu_rq(cpu), p))
__select_idle_cpu() is only called when "has_idle_core" is false which
means it is highly unlikely we'll find an idle core. In such cases, just
matching the cookie should be sufficient right?
Do you have any benchmark numbers which shows a large difference with
these changes?
> return cpu;
>
> return -1;
> @@ -7546,6 +7546,9 @@ static int select_idle_smt(struct task_struct *p, struct sched_domain *sd, int t
> {
> int cpu;
>
> + if (!sched_core_cookie_match(cpu_rq(target), p))
> + return -1;
> +
select_idle_smt() is again called when "has_idle_core" is false and
sched_cpu_cookie_match() should be sufficient for most part here too.
> for_each_cpu_and(cpu, cpu_smt_mask(target), p->cpus_ptr) {
> if (cpu == target)
> continue;
--
Thanks and Regards,
Prateek
Powered by blists - more mailing lists