summaryrefslogtreecommitdiffstats
path: root/kernel/sched_idletask.c
diff options
context:
space:
mode:
authorPeter Williams <pwil3058@bigpond.net.au>2007-10-24 18:23:51 +0200
committerIngo Molnar <mingo@elte.hu>2007-10-24 18:23:51 +0200
commite1d1484f72127a5580d37c379f6a5b2c2786434c (patch)
treee3e6529c5b9079f35b2c60bbd346a3c51c2b2c13 /kernel/sched_idletask.c
parenta0f846aa76c3e03d54c1700a87cab3a46ccd71e2 (diff)
sched: reduce balance-tasks overhead
At the moment, balance_tasks() provides low level functionality for both move_tasks() and move_one_task() (indirectly) via the load_balance() function (in the sched_class interface) which also provides dual functionality. This dual functionality complicates the interfaces and internal mechanisms and makes the run time overhead of operations that are called with two run queue locks held. This patch addresses this issue and reduces the overhead of these operations. Signed-off-by: Peter Williams <pwil3058@bigpond.net.au> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched_idletask.c')
-rw-r--r--kernel/sched_idletask.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/kernel/sched_idletask.c b/kernel/sched_idletask.c
index 6e2ead41516..586b06ca30a 100644
--- a/kernel/sched_idletask.c
+++ b/kernel/sched_idletask.c
@@ -39,9 +39,16 @@ static void put_prev_task_idle(struct rq *rq, struct task_struct *prev)
static unsigned long
load_balance_idle(struct rq *this_rq, int this_cpu, struct rq *busiest,
- unsigned long max_nr_move, unsigned long max_load_move,
- struct sched_domain *sd, enum cpu_idle_type idle,
- int *all_pinned, int *this_best_prio)
+ unsigned long max_load_move,
+ struct sched_domain *sd, enum cpu_idle_type idle,
+ int *all_pinned, int *this_best_prio)
+{
+ return 0;
+}
+
+static int
+move_one_task_idle(struct rq *this_rq, int this_cpu, struct rq *busiest,
+ struct sched_domain *sd, enum cpu_idle_type idle)
{
return 0;
}
@@ -70,6 +77,7 @@ const struct sched_class idle_sched_class = {
.put_prev_task = put_prev_task_idle,
.load_balance = load_balance_idle,
+ .move_one_task = move_one_task_idle,
.set_curr_task = set_curr_task_idle,
.task_tick = task_tick_idle,