|
@@ -2378,8 +2378,12 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state,
|
|
|
*
|
|
|
* First fix up the nr_uninterruptible count:
|
|
|
*/
|
|
|
- if (task_contributes_to_load(p))
|
|
|
- rq->nr_uninterruptible--;
|
|
|
+ if (task_contributes_to_load(p)) {
|
|
|
+ if (likely(cpu_online(orig_cpu)))
|
|
|
+ rq->nr_uninterruptible--;
|
|
|
+ else
|
|
|
+ this_rq()->nr_uninterruptible--;
|
|
|
+ }
|
|
|
p->state = TASK_WAKING;
|
|
|
|
|
|
if (p->sched_class->task_waking)
|