aboutsummaryrefslogtreecommitdiffstats
path: root/include/litmus/rt_param.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/litmus/rt_param.h')
-rw-r--r--include/litmus/rt_param.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h
index a7a183f34a80..9927b09e0a01 100644
--- a/include/litmus/rt_param.h
+++ b/include/litmus/rt_param.h
@@ -1,3 +1,5 @@
1#include <linux/threads.h>
2
1/* 3/*
2 * Definition of the scheduler plugin interface. 4 * Definition of the scheduler plugin interface.
3 * 5 *
@@ -33,6 +35,36 @@ typedef enum {
33 PRECISE_ENFORCEMENT /* NOT IMPLEMENTED - enforced with hrtimers */ 35 PRECISE_ENFORCEMENT /* NOT IMPLEMENTED - enforced with hrtimers */
34} budget_policy_t; 36} budget_policy_t;
35 37
38/* The parameters for the EDF-WM semi-partitioned scheduler.
39 * Each task may be split across multiple cpus. Each per-cpu allocation
40 * is called a 'slice'.
41 */
42#define MAX_EDF_WM_SLICES 24
43#define MIN_EDF_WM_SLICE_SIZE 50000 /* .05 millisecond = 50us */
44
45struct edf_wm_slice {
46 /* on which CPU is this slice allocated */
47 unsigned int cpu;
48 /* relative deadline from job release (not from slice release!) */
49 lt_t deadline;
50 /* budget of this slice; must be precisely enforced */
51 lt_t budget;
52 /* offset of this slice relative to the job release */
53 lt_t offset;
54};
55
56/* If a job is not sliced across multiple CPUs, then
57 * count is set to zero and none of the slices is used.
58 * This implies that count == 1 is illegal.
59 */
60struct edf_wm_params {
61 /* enumeration of all slices */
62 struct edf_wm_slice slices[MAX_EDF_WM_SLICES];
63
64 /* how many slices are defined? */
65 unsigned int count;
66};
67
36struct rt_task { 68struct rt_task {
37 lt_t exec_cost; 69 lt_t exec_cost;
38 lt_t period; 70 lt_t period;
@@ -40,6 +72,12 @@ struct rt_task {
40 unsigned int cpu; 72 unsigned int cpu;
41 task_class_t cls; 73 task_class_t cls;
42 budget_policy_t budget_policy; /* ignored by pfair */ 74 budget_policy_t budget_policy; /* ignored by pfair */
75
76 /* parameters used by the semi-partitioned algorithms */
77 union {
78 /* EDF-WM; defined in sched_edf_wm.c */
79 struct edf_wm_params wm;
80 } semi_part;
43}; 81};
44 82
45/* The definition of the data that is shared between the kernel and real-time 83/* The definition of the data that is shared between the kernel and real-time
@@ -184,6 +222,21 @@ struct rt_param {
184 222
185 /* Pointer to the page shared between userspace and kernel. */ 223 /* Pointer to the page shared between userspace and kernel. */
186 struct control_page * ctrl_page; 224 struct control_page * ctrl_page;
225
226 /* runtime info for the semi-part plugins */
227 union {
228 /* EDF-WM runtime information */
229 struct {
230 /* at which exec time did the current slice start? */
231 lt_t exec_time;
232 /* when did the job suspend? */
233 lt_t suspend_time;
234 /* cached job parameters */
235 lt_t job_release, job_deadline;
236 /* pointer to the current slice */
237 struct edf_wm_slice* slice;
238 } wm;
239 } semi_part;
187}; 240};
188 241
189/* Possible RT flags */ 242/* Possible RT flags */