Skip to content

Commit

Permalink
sched: Simplify the idle scheduling class
Browse files Browse the repository at this point in the history
Since commit 48c5cca (sched: Simplify cpu-hot-unplug task
migration) this should no longer happen, so remove the code.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Jan 26, 2011
1 parent 414bee9 commit a8941d7
Showing 1 changed file with 4 additions and 19 deletions.
23 changes: 4 additions & 19 deletions kernel/sched_idletask.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,31 +52,16 @@ static void set_curr_task_idle(struct rq *rq)
{
}

static void switched_to_idle(struct rq *rq, struct task_struct *p,
int running)
static void
switched_to_idle(struct rq *rq, struct task_struct *p, int running)
{
/* Can this actually happen?? */
if (running)
resched_task(rq->curr);
else
check_preempt_curr(rq, p, 0);
BUG();
}

static void prio_changed_idle(struct rq *rq, struct task_struct *p,
int oldprio, int running)
{
/* This can happen for hot plug CPUS */

/*
* Reschedule if we are currently running on this runqueue and
* our priority decreased, or if we are not currently running on
* this runqueue and our priority is higher than the current's
*/
if (running) {
if (p->prio > oldprio)
resched_task(rq->curr);
} else
check_preempt_curr(rq, p, 0);
BUG();
}

static unsigned int get_rr_interval_idle(struct rq *rq, struct task_struct *task)
Expand Down

0 comments on commit a8941d7

Please sign in to comment.