diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2008-01-25 15:08:30 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-25 15:08:30 -0500 |
commit | 6f505b16425a51270058e4a93441fe64de3dd435 (patch) | |
tree | be21e711d93bc4d088b97c4a4f585a5044dbaa7d /include/linux/sched.h | |
parent | fa85ae2418e6843953107cd6a06f645752829bc0 (diff) |
sched: rt group scheduling
Extend group scheduling to also cover the realtime classes. It uses the time
limiting introduced by the previous patch to allow multiple realtime groups.
The hard time limit is required to keep behaviour deterministic.
The algorithms used make the realtime scheduler O(tg), linear scaling wrt the
number of task groups. This is the worst case behaviour I can't seem to get out
of, the avg. case of the algorithms can be improved, I focused on correctness
and worst case.
[ akpm@linux-foundation.org: move side-effects out of BUG_ON(). ]
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index d5ea144df836..04eecbf0241e 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -934,6 +934,15 @@ struct sched_rt_entity { | |||
934 | struct list_head run_list; | 934 | struct list_head run_list; |
935 | unsigned int time_slice; | 935 | unsigned int time_slice; |
936 | unsigned long timeout; | 936 | unsigned long timeout; |
937 | int nr_cpus_allowed; | ||
938 | |||
939 | #ifdef CONFIG_FAIR_GROUP_SCHED | ||
940 | struct sched_rt_entity *parent; | ||
941 | /* rq on which this entity is (to be) queued: */ | ||
942 | struct rt_rq *rt_rq; | ||
943 | /* rq "owned" by this entity/group: */ | ||
944 | struct rt_rq *my_q; | ||
945 | #endif | ||
937 | }; | 946 | }; |
938 | 947 | ||
939 | struct task_struct { | 948 | struct task_struct { |
@@ -978,7 +987,6 @@ struct task_struct { | |||
978 | 987 | ||
979 | unsigned int policy; | 988 | unsigned int policy; |
980 | cpumask_t cpus_allowed; | 989 | cpumask_t cpus_allowed; |
981 | int nr_cpus_allowed; | ||
982 | 990 | ||
983 | #ifdef CONFIG_PREEMPT_RCU | 991 | #ifdef CONFIG_PREEMPT_RCU |
984 | int rcu_read_lock_nesting; | 992 | int rcu_read_lock_nesting; |