@@ -5473,10 +5473,10 @@ static struct notifier_block migration_notifier = {
54735473 .priority = CPU_PRI_MIGRATION ,
54745474};
54755475
5476- static void set_cpu_rq_start_time (void )
5476+ static void set_cpu_rq_start_time (unsigned int cpu )
54775477{
5478- int cpu = smp_processor_id ();
54795478 struct rq * rq = cpu_rq (cpu );
5479+
54805480 rq -> age_stamp = sched_clock_cpu (cpu );
54815481}
54825482
@@ -5486,10 +5486,6 @@ static int sched_cpu_active(struct notifier_block *nfb,
54865486 int cpu = (long )hcpu ;
54875487
54885488 switch (action & ~CPU_TASKS_FROZEN ) {
5489- case CPU_STARTING :
5490- set_cpu_rq_start_time ();
5491- return NOTIFY_OK ;
5492-
54935489 case CPU_DOWN_FAILED :
54945490 set_cpu_active (cpu , true);
54955491 return NOTIFY_OK ;
@@ -5511,6 +5507,12 @@ static int sched_cpu_inactive(struct notifier_block *nfb,
55115507 }
55125508}
55135509
5510+ int sched_cpu_starting (unsigned int cpu )
5511+ {
5512+ set_cpu_rq_start_time (cpu );
5513+ return 0 ;
5514+ }
5515+
55145516static int __init migration_init (void )
55155517{
55165518 void * cpu = (void * )(long )smp_processor_id ();
@@ -7426,7 +7428,7 @@ void __init sched_init(void)
74267428 if (cpu_isolated_map == NULL )
74277429 zalloc_cpumask_var (& cpu_isolated_map , GFP_NOWAIT );
74287430 idle_thread_set_boot_cpu ();
7429- set_cpu_rq_start_time ();
7431+ set_cpu_rq_start_time (smp_processor_id () );
74307432#endif
74317433 init_sched_fair_class ();
74327434
0 commit comments