[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAKfTPtD+YVAkPM3x7WLBOHhh9E1z9E96T7Ff3sbrH2fNnG=mCQ@mail.gmail.com>
Date: Mon, 4 Aug 2025 17:35:24 +0200
From: Vincent Guittot <vincent.guittot@...aro.org>
To: Bing Huang <huangbing@...inos.cn>
Cc: mingo@...hat.com, peterz@...radead.org, juri.lelli@...hat.com,
dietmar.eggemann@....com, rostedt@...dmis.org, bsegall@...gle.com,
mgorman@...e.de, vschneid@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sched/topology: Remove the rq variable in build_sched_domains
On Mon, 4 Aug 2025 at 08:45, Bing Huang <huangbing@...inos.cn> wrote:
>
> It is no longer necessary to obtain the root_domain's max_cpu_capacity via the rq.
> Consequently, the rq variable has lost its substantive meaning.
>
> Fixes: fa427e8e53d8 ("sched/topology: Remove root_domain::max_cpu_capacity")
> Signed-off-by: Bing Huang <huangbing@...inos.cn>
Reviewed-by: Vincent Guittot <vincent.guittot@...aro.org>
> ---
> kernel/sched/topology.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
> index 977e133bb8a4..5eb464039d1b 100644
> --- a/kernel/sched/topology.c
> +++ b/kernel/sched/topology.c
> @@ -2444,7 +2444,6 @@ build_sched_domains(const struct cpumask *cpu_map, struct sched_domain_attr *att
> enum s_alloc alloc_state = sa_none;
> struct sched_domain *sd;
> struct s_data d;
> - struct rq *rq = NULL;
> int i, ret = -ENOMEM;
> bool has_asym = false;
> bool has_cluster = false;
> @@ -2563,7 +2562,6 @@ build_sched_domains(const struct cpumask *cpu_map, struct sched_domain_attr *att
> /* Attach the domains */
> rcu_read_lock();
> for_each_cpu(i, cpu_map) {
> - rq = cpu_rq(i);
> sd = *per_cpu_ptr(d.sd, i);
>
> cpu_attach_domain(sd, d.rd, i);
> @@ -2579,7 +2577,7 @@ build_sched_domains(const struct cpumask *cpu_map, struct sched_domain_attr *att
> if (has_cluster)
> static_branch_inc_cpuslocked(&sched_cluster_active);
>
> - if (rq && sched_debug_verbose)
> + if (sched_debug_verbose)
> pr_info("root domain span: %*pbl\n", cpumask_pr_args(cpu_map));
>
> ret = 0;
> --
> 2.25.1
>
Powered by blists - more mailing lists