aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/init_task.h2
-rw-r--r--include/linux/sched.h6
2 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index 9c66b1ada9d7..f994d51f70f2 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -149,7 +149,7 @@ extern struct cred init_cred;
149 }, \ 149 }, \
150 .rt = { \ 150 .rt = { \
151 .run_list = LIST_HEAD_INIT(tsk.rt.run_list), \ 151 .run_list = LIST_HEAD_INIT(tsk.rt.run_list), \
152 .time_slice = HZ, \ 152 .time_slice = RR_TIMESLICE, \
153 .nr_cpus_allowed = NR_CPUS, \ 153 .nr_cpus_allowed = NR_CPUS, \
154 }, \ 154 }, \
155 .tasks = LIST_HEAD_INIT(tsk.tasks), \ 155 .tasks = LIST_HEAD_INIT(tsk.tasks), \
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 5dba2ad52431..eb5de466f099 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1234,6 +1234,12 @@ struct sched_rt_entity {
1234#endif 1234#endif
1235}; 1235};
1236 1236
1237/*
1238 * default timeslice is 100 msecs (used only for SCHED_RR tasks).
1239 * Timeslices get refilled after they expire.
1240 */
1241#define RR_TIMESLICE (100 * HZ / 1000)
1242
1237struct rcu_node; 1243struct rcu_node;
1238 1244
1239enum perf_event_task_context { 1245enum perf_event_task_context {