diff options
author | Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com> | 2007-10-15 11:00:09 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2007-10-15 11:00:09 -0400 |
commit | 9b5b77512dce239fa168183fa71896712232e95a (patch) | |
tree | 2a95cf9151b4b6bd745236858f5b73b639dbc0d9 /include/linux/sched.h | |
parent | 75c28ace9f2b2f403674e045939424a77c95b47c (diff) |
sched: clean up code under CONFIG_FAIR_GROUP_SCHED
With the view of supporting user-id based fair scheduling (and not just
container-based fair scheduling), this patch renames several functions
and makes them independent of whether they are being used for container
or user-id based fair scheduling.
Also fix a problem reported by KAMEZAWA Hiroyuki (wrt allocating
less-sized array for tg->cfs_rq[] and tf->se[]).
Signed-off-by: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 66169005f008..03c13b663e4b 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -136,6 +136,7 @@ extern unsigned long weighted_cpuload(const int cpu); | |||
136 | 136 | ||
137 | struct seq_file; | 137 | struct seq_file; |
138 | struct cfs_rq; | 138 | struct cfs_rq; |
139 | struct task_grp; | ||
139 | #ifdef CONFIG_SCHED_DEBUG | 140 | #ifdef CONFIG_SCHED_DEBUG |
140 | extern void proc_sched_show_task(struct task_struct *p, struct seq_file *m); | 141 | extern void proc_sched_show_task(struct task_struct *p, struct seq_file *m); |
141 | extern void proc_sched_set_task(struct task_struct *p); | 142 | extern void proc_sched_set_task(struct task_struct *p); |
@@ -1834,6 +1835,17 @@ extern int sched_mc_power_savings, sched_smt_power_savings; | |||
1834 | 1835 | ||
1835 | extern void normalize_rt_tasks(void); | 1836 | extern void normalize_rt_tasks(void); |
1836 | 1837 | ||
1838 | #ifdef CONFIG_FAIR_GROUP_SCHED | ||
1839 | |||
1840 | extern struct task_grp init_task_grp; | ||
1841 | |||
1842 | extern struct task_grp *sched_create_group(void); | ||
1843 | extern void sched_destroy_group(struct task_grp *tg); | ||
1844 | extern void sched_move_task(struct task_struct *tsk); | ||
1845 | extern int sched_group_set_shares(struct task_grp *tg, unsigned long shares); | ||
1846 | |||
1847 | #endif | ||
1848 | |||
1837 | #ifdef CONFIG_TASK_XACCT | 1849 | #ifdef CONFIG_TASK_XACCT |
1838 | static inline void add_rchar(struct task_struct *tsk, ssize_t amt) | 1850 | static inline void add_rchar(struct task_struct *tsk, ssize_t amt) |
1839 | { | 1851 | { |