[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <90e7343e-7741-45d8-b076-d3852d1870fb@intel.com>
Date: Sun, 12 Oct 2025 01:42:30 +0800
From: "Chen, Yu C" <yu.c.chen@...el.com>
To: Adam Li <adamli@...amperecomputing.com>
CC: <dietmar.eggemann@....com>, <rostedt@...dmis.org>, <bsegall@...gle.com>,
<mgorman@...e.de>, <vschneid@...hat.com>, <cl@...ux.com>,
<linux-kernel@...r.kernel.org>, <patches@...erecomputing.com>,
<shkaushik@...erecomputing.com>, <mingo@...hat.com>, <peterz@...radead.org>,
<juri.lelli@...hat.com>, <vincent.guittot@...aro.org>
Subject: Re: [PATCH RESEND] sched/fair: Only update stats for allowed CPUs
when looking for dst group
On 10/11/2025 2:43 PM, Adam Li wrote:
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index bc0b7ce8a65d..d5ec15050ebc 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -10671,7 +10671,7 @@ static inline void update_sg_wakeup_stats(struct sched_domain *sd,
> if (sd->flags & SD_ASYM_CPUCAPACITY)
> sgs->group_misfit_task_load = 1;
>
> - for_each_cpu(i, sched_group_span(group)) {
> + for_each_cpu_and(i, sched_group_span(group), p->cpus_ptr) {
Looks good to me. One minor question, would pre-calculating the mask be
better?
Copied from select_idle_cpu():
cpus = this_cpu_cpumask_var_ptr(select_rq_mask);
cpumask_and(cpus, sched_group_span(sd), p->cpus_ptr);
for_each_cpu(i, cpus) {
thanks,
Chenyu
Powered by blists - more mailing lists