sched/topology: Remove root_domain::max_cpu_capacity
authorQais Yousef <qyousef@layalina.io>
Sun, 24 Mar 2024 00:45:51 +0000 (00:45 +0000)
committerIngo Molnar <mingo@kernel.org>
Mon, 25 Mar 2024 11:09:56 +0000 (12:09 +0100)
The value is no longer used as we now keep track of max_allowed_capacity
for each task instead.

Signed-off-by: Qais Yousef <qyousef@layalina.io>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
Link: https://lore.kernel.org/r/20240324004552.999936-4-qyousef@layalina.io
kernel/sched/sched.h
kernel/sched/topology.c

index f77c00dddfe1a608cdd01cdabec6ee7f6a924ee9..4f9e952d4fad00031fd942d8a95f193084027e6f 100644 (file)
@@ -917,8 +917,6 @@ struct root_domain {
        cpumask_var_t           rto_mask;
        struct cpupri           cpupri;
 
-       unsigned long           max_cpu_capacity;
-
        /*
         * NULL-terminated list of performance domains intersecting with the
         * CPUs of the rd. Protected by RCU.
index 44ed3d0812ab9e0665576e5f0a1642fab5cb3a31..63aecd2a7a9f351e557e74ba101c04da4250605d 100644 (file)
@@ -2514,16 +2514,9 @@ 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) {
-               unsigned long capacity;
-
                rq = cpu_rq(i);
                sd = *per_cpu_ptr(d.sd, i);
 
-               capacity = arch_scale_cpu_capacity(i);
-               /* Use READ_ONCE()/WRITE_ONCE() to avoid load/store tearing: */
-               if (capacity > READ_ONCE(d.rd->max_cpu_capacity))
-                       WRITE_ONCE(d.rd->max_cpu_capacity, capacity);
-
                cpu_attach_domain(sd, d.rd, i);
 
                if (lowest_flag_domain(i, SD_CLUSTER))
@@ -2537,10 +2530,8 @@ 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) {
-               pr_info("root domain span: %*pbl (max cpu_capacity = %lu)\n",
-                       cpumask_pr_args(cpu_map), rq->rd->max_cpu_capacity);
-       }
+       if (rq && sched_debug_verbose)
+               pr_info("root domain span: %*pbl\n", cpumask_pr_args(cpu_map));
 
        ret = 0;
 error: