diff options
-rw-r--r-- | kernel/sched.c | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index db1f71e31310..cc8cb6f7d82e 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -5282,23 +5282,9 @@ static void migrate_live_tasks(int src_cpu) | |||
5282 | } | 5282 | } |
5283 | 5283 | ||
5284 | /* | 5284 | /* |
5285 | * activate_idle_task - move idle task to the _front_ of runqueue. | ||
5286 | */ | ||
5287 | static void activate_idle_task(struct task_struct *p, struct rq *rq) | ||
5288 | { | ||
5289 | update_rq_clock(rq); | ||
5290 | |||
5291 | if (p->state == TASK_UNINTERRUPTIBLE) | ||
5292 | rq->nr_uninterruptible--; | ||
5293 | |||
5294 | enqueue_task(rq, p, 0); | ||
5295 | inc_nr_running(p, rq); | ||
5296 | } | ||
5297 | |||
5298 | /* | ||
5299 | * Schedules idle task to be the next runnable task on current CPU. | 5285 | * Schedules idle task to be the next runnable task on current CPU. |
5300 | * It does so by boosting its priority to highest possible and adding it to | 5286 | * It does so by boosting its priority to highest possible. |
5301 | * the _front_ of the runqueue. Used by CPU offline code. | 5287 | * Used by CPU offline code. |
5302 | */ | 5288 | */ |
5303 | void sched_idle_next(void) | 5289 | void sched_idle_next(void) |
5304 | { | 5290 | { |
@@ -5318,8 +5304,8 @@ void sched_idle_next(void) | |||
5318 | 5304 | ||
5319 | __setscheduler(rq, p, SCHED_FIFO, MAX_RT_PRIO-1); | 5305 | __setscheduler(rq, p, SCHED_FIFO, MAX_RT_PRIO-1); |
5320 | 5306 | ||
5321 | /* Add idle task to the _front_ of its priority queue: */ | 5307 | update_rq_clock(rq); |
5322 | activate_idle_task(p, rq); | 5308 | activate_task(rq, p, 0); |
5323 | 5309 | ||
5324 | spin_unlock_irqrestore(&rq->lock, flags); | 5310 | spin_unlock_irqrestore(&rq->lock, flags); |
5325 | } | 5311 | } |