struct task_struct * (*pick_next_task) (struct rq *rq);
void (*put_prev_task) (struct rq *rq, struct task_struct *p);
+#ifdef CONFIG_SMP
unsigned long (*load_balance) (struct rq *this_rq, int this_cpu,
struct rq *busiest, unsigned long max_load_move,
struct sched_domain *sd, enum cpu_idle_type idle,
int (*move_one_task) (struct rq *this_rq, int this_cpu,
struct rq *busiest, struct sched_domain *sd,
enum cpu_idle_type idle);
+#endif
void (*set_curr_task) (struct rq *rq);
void (*task_tick) (struct rq *rq, struct task_struct *p);
iter_move_one_task(struct rq *this_rq, int this_cpu, struct rq *busiest,
struct sched_domain *sd, enum cpu_idle_type idle,
struct rq_iterator *iterator);
-#else
-static inline unsigned long
-balance_tasks(struct rq *this_rq, int this_cpu, struct rq *busiest,
- unsigned long max_load_move, struct sched_domain *sd,
- enum cpu_idle_type idle, int *all_pinned,
- int *this_best_prio, struct rq_iterator *iterator)
-{
- return 0;
-}
-
-static inline int
-iter_move_one_task(struct rq *this_rq, int this_cpu, struct rq *busiest,
- struct sched_domain *sd, enum cpu_idle_type idle,
- struct rq_iterator *iterator)
-{
- return 0;
-}
#endif
#include "sched_stats.h"
}
}
+#ifdef CONFIG_SMP
/**************************************************
* Fair scheduling class load-balancing methods:
*/
return 0;
}
+#endif
/*
* scheduler tick hitting a task of our scheduling class:
.pick_next_task = pick_next_task_fair,
.put_prev_task = put_prev_task_fair,
+#ifdef CONFIG_SMP
.load_balance = load_balance_fair,
.move_one_task = move_one_task_fair,
+#endif
.set_curr_task = set_curr_task_fair,
.task_tick = task_tick_fair,
{
}
+#ifdef CONFIG_SMP
static unsigned long
load_balance_idle(struct rq *this_rq, int this_cpu, struct rq *busiest,
unsigned long max_load_move,
{
return 0;
}
+#endif
static void task_tick_idle(struct rq *rq, struct task_struct *curr)
{
.pick_next_task = pick_next_task_idle,
.put_prev_task = put_prev_task_idle,
+#ifdef CONFIG_SMP
.load_balance = load_balance_idle,
.move_one_task = move_one_task_idle,
+#endif
.set_curr_task = set_curr_task_idle,
.task_tick = task_tick_idle,
p->se.exec_start = 0;
}
+#ifdef CONFIG_SMP
/*
* Load-balancing iterator. Note: while the runqueue stays locked
* during the whole iteration, the current task might be
return iter_move_one_task(this_rq, this_cpu, busiest, sd, idle,
&rt_rq_iterator);
}
+#endif
static void task_tick_rt(struct rq *rq, struct task_struct *p)
{
.pick_next_task = pick_next_task_rt,
.put_prev_task = put_prev_task_rt,
+#ifdef CONFIG_SMP
.load_balance = load_balance_rt,
.move_one_task = move_one_task_rt,
+#endif
.set_curr_task = set_curr_task_rt,
.task_tick = task_tick_rt,