diff options
author | Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> | 2012-02-16 14:52:21 +0900 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2012-02-22 12:28:29 +0100 |
commit | de5bdff7a72acc281219be2b8edeeca1fd81c542 (patch) | |
tree | 6a528beb1852e2fd7d444b47e8b4cc6e6be31108 /include | |
parent | 62f6536a630affe3176deb48554d27ee58b65077 (diff) | |
download | op-kernel-dev-de5bdff7a72acc281219be2b8edeeca1fd81c542.zip op-kernel-dev-de5bdff7a72acc281219be2b8edeeca1fd81c542.tar.gz |
sched: Make initial SCHED_RR timeslace DEF_TIMESLICE
Current the initial SCHED_RR timeslice of init_task is HZ, which means
1s, and is not same as the default SCHED_RR timeslice DEF_TIMESLICE.
Change that initial timeslice to the DEF_TIMESLICE.
Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
[ s/DEF_TIMESLICE/RR_TIMESLICE/g ]
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/4F3C9995.3010800@ct.jp.nec.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/init_task.h | 2 | ||||
-rw-r--r-- | include/linux/sched.h | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 9c66b1a..f994d51 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h @@ -149,7 +149,7 @@ extern struct cred init_cred; }, \ .rt = { \ .run_list = LIST_HEAD_INIT(tsk.rt.run_list), \ - .time_slice = HZ, \ + .time_slice = RR_TIMESLICE, \ .nr_cpus_allowed = NR_CPUS, \ }, \ .tasks = LIST_HEAD_INIT(tsk.tasks), \ diff --git a/include/linux/sched.h b/include/linux/sched.h index 5dba2ad..eb5de46 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1234,6 +1234,12 @@ struct sched_rt_entity { #endif }; +/* + * default timeslice is 100 msecs (used only for SCHED_RR tasks). + * Timeslices get refilled after they expire. + */ +#define RR_TIMESLICE (100 * HZ / 1000) + struct rcu_node; enum perf_event_task_context { |