Skip to content

Commit bfb1587

Browse files
committed
sched/alt: Fix task migratie to dying cpu.
Fix torvalds#23 WARNING: CPU: 2 PID: 26 at kernel/sched/alt_core.c:6294 sched_cpu_dying.cold+0xc/0xd2
1 parent 672418a commit bfb1587

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: kernel/sched/alt_core.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -1619,7 +1619,7 @@ static inline int select_task_rq(struct task_struct *p, struct rq *rq)
16191619
{
16201620
cpumask_t chk_mask, tmp;
16211621

1622-
if (unlikely(!cpumask_and(&chk_mask, p->cpus_ptr, cpu_online_mask)))
1622+
if (unlikely(!cpumask_and(&chk_mask, p->cpus_ptr, cpu_active_mask)))
16231623
return select_fallback_rq(task_cpu(p), p);
16241624

16251625
if (
@@ -3420,6 +3420,10 @@ static inline void sg_balance_check(struct rq *rq)
34203420
if (cpumask_empty(&sched_sg_idle_mask))
34213421
return;
34223422

3423+
/* exit when cpu is offline */
3424+
if (unlikely(!rq->online))
3425+
return;
3426+
34233427
cpu = cpu_of(rq);
34243428
/*
34253429
* Only cpu in slibing idle group will do the checking and then

0 commit comments

Comments
 (0)