aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorPeter Williams <pwil3058@bigpond.net.au>2007-10-24 12:23:51 -0400
committerIngo Molnar <mingo@elte.hu>2007-10-24 12:23:51 -0400
commite1d1484f72127a5580d37c379f6a5b2c2786434c (patch)
treee3e6529c5b9079f35b2c60bbd346a3c51c2b2c13 /include/linux/sched.h
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 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 52288a647692..639241f4f3d1 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -829,11 +829,14 @@ struct sched_class {
829 void (*put_prev_task) (struct rq *rq, struct task_struct *p); 829 void (*put_prev_task) (struct rq *rq, struct task_struct *p);
830 830
831 unsigned long (*load_balance) (struct rq *this_rq, int this_cpu, 831 unsigned long (*load_balance) (struct rq *this_rq, int this_cpu,
832 struct rq *busiest, 832 struct rq *busiest, unsigned long max_load_move,
833 unsigned long max_nr_move, unsigned long max_load_move,
834 struct sched_domain *sd, enum cpu_idle_type idle, 833 struct sched_domain *sd, enum cpu_idle_type idle,
835 int *all_pinned, int *this_best_prio); 834 int *all_pinned, int *this_best_prio);
836 835
836 int (*move_one_task) (struct rq *this_rq, int this_cpu,
837 struct rq *busiest, struct sched_domain *sd,
838 enum cpu_idle_type idle);
839
837 void (*set_curr_task) (struct rq *rq); 840 void (*set_curr_task) (struct rq *rq);
838 void (*task_tick) (struct rq *rq, struct task_struct *p); 841 void (*task_tick) (struct rq *rq, struct task_struct *p);
839 void (*task_new) (struct rq *rq, struct task_struct *p); 842 void (*task_new) (struct rq *rq, struct task_struct *p);