File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -6903,6 +6903,7 @@ static int build_sched_domains(const struct cpumask *cpu_map,
6903
6903
enum s_alloc alloc_state ;
6904
6904
struct sched_domain * sd ;
6905
6905
struct s_data d ;
6906
+ struct rq * rq = NULL ;
6906
6907
int i , ret = - ENOMEM ;
6907
6908
6908
6909
alloc_state = __visit_domain_allocation_hell (& d , cpu_map );
@@ -6953,11 +6954,22 @@ static int build_sched_domains(const struct cpumask *cpu_map,
6953
6954
/* Attach the domains */
6954
6955
rcu_read_lock ();
6955
6956
for_each_cpu (i , cpu_map ) {
6957
+ rq = cpu_rq (i );
6956
6958
sd = * per_cpu_ptr (d .sd , i );
6959
+
6960
+ /* Use READ_ONCE()/WRITE_ONCE() to avoid load/store tearing: */
6961
+ if (rq -> cpu_capacity_orig > READ_ONCE (d .rd -> max_cpu_capacity ))
6962
+ WRITE_ONCE (d .rd -> max_cpu_capacity , rq -> cpu_capacity_orig );
6963
+
6957
6964
cpu_attach_domain (sd , d .rd , i );
6958
6965
}
6959
6966
rcu_read_unlock ();
6960
6967
6968
+ if (rq ) {
6969
+ pr_info ("span: %*pbl (max cpu_capacity = %lu)\n" ,
6970
+ cpumask_pr_args (cpu_map ), rq -> rd -> max_cpu_capacity );
6971
+ }
6972
+
6961
6973
ret = 0 ;
6962
6974
error :
6963
6975
__free_domain_allocs (& d , alloc_state , cpu_map );
Original file line number Diff line number Diff line change @@ -565,6 +565,8 @@ struct root_domain {
565
565
*/
566
566
cpumask_var_t rto_mask ;
567
567
struct cpupri cpupri ;
568
+
569
+ unsigned long max_cpu_capacity ;
568
570
};
569
571
570
572
extern struct root_domain def_root_domain ;
You can’t perform that action at this time.
0 commit comments