File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -3465,27 +3465,22 @@ void sched_exec(void)
3465
3465
{
3466
3466
struct task_struct * p = current ;
3467
3467
unsigned long flags ;
3468
- struct rq * rq ;
3469
3468
int dest_cpu ;
3470
3469
3471
- rq = task_rq_lock ( p , & flags );
3470
+ raw_spin_lock_irqsave ( & p -> pi_lock , flags );
3472
3471
dest_cpu = p -> sched_class -> select_task_rq (p , SD_BALANCE_EXEC , 0 );
3473
3472
if (dest_cpu == smp_processor_id ())
3474
3473
goto unlock ;
3475
3474
3476
- /*
3477
- * select_task_rq() can race against ->cpus_allowed
3478
- */
3479
- if (cpumask_test_cpu (dest_cpu , & p -> cpus_allowed ) &&
3480
- likely (cpu_active (dest_cpu )) && need_migrate_task (p )) {
3475
+ if (likely (cpu_active (dest_cpu ))) {
3481
3476
struct migration_arg arg = { p , dest_cpu };
3482
3477
3483
- task_rq_unlock ( rq , p , & flags );
3484
- stop_one_cpu (cpu_of ( rq ), migration_cpu_stop , & arg );
3478
+ raw_spin_unlock_irqrestore ( & p -> pi_lock , flags );
3479
+ stop_one_cpu (task_cpu ( p ), migration_cpu_stop , & arg );
3485
3480
return ;
3486
3481
}
3487
3482
unlock :
3488
- task_rq_unlock ( rq , p , & flags );
3483
+ raw_spin_unlock_irqrestore ( & p -> pi_lock , flags );
3489
3484
}
3490
3485
3491
3486
#endif
You can’t perform that action at this time.
0 commit comments