aboutsummaryrefslogtreecommitdiffstats
path: root/include/litmus/sched_mc.h
diff options
context:
space:
mode:
authorChristopher Kenna <cjk@cs.unc.edu>2011-09-24 19:23:25 -0400
committerChristopher Kenna <cjk@cs.unc.edu>2011-09-24 19:23:25 -0400
commitbe37a04426a806099b4084452fe4275db5254fea (patch)
treefae6fc6e48b408ab108988bd82cabbc040f9307a /include/litmus/sched_mc.h
parentd1e50b511a6586da696ef5a61ed18818b8139b67 (diff)
Check point commit for merging CE with MC plugin.
Also started to fix typos in Jonathan's code, but there were too many after I realized that event_group.o was not in the LITMUS Makefile.
Diffstat (limited to 'include/litmus/sched_mc.h')
-rw-r--r--include/litmus/sched_mc.h29
1 files changed, 27 insertions, 2 deletions
diff --git a/include/litmus/sched_mc.h b/include/litmus/sched_mc.h
index d29796298701..95cd22cd7202 100644
--- a/include/litmus/sched_mc.h
+++ b/include/litmus/sched_mc.h
@@ -1,8 +1,6 @@
1#ifndef _LINUX_SCHED_MC_H_ 1#ifndef _LINUX_SCHED_MC_H_
2#define _LINUX_SCHED_MC_H_ 2#define _LINUX_SCHED_MC_H_
3 3
4#include <litmus/rt_param.h>
5
6/* criticality levels */ 4/* criticality levels */
7enum crit_level { 5enum crit_level {
8 /* probably don't need to assign these (paranoid) */ 6 /* probably don't need to assign these (paranoid) */
@@ -34,6 +32,33 @@ struct mc_data {
34#define tsk_mc_crit(t) (tsk_mc_data(t)->mc_task.crit) 32#define tsk_mc_crit(t) (tsk_mc_data(t)->mc_task.crit)
35#define is_ghost(t) (tsk_mc_data(t)->mc_job.is_ghost) 33#define is_ghost(t) (tsk_mc_data(t)->mc_job.is_ghost)
36 34
35/*
36 * Cache the budget along with the struct PID for a task so that we don't need
37 * to fetch its task_struct every time we check to see what should be
38 * scheduled.
39 */
40struct ce_dom_pid_entry {
41 struct pid *pid;
42 lt_t budget;
43 /* accumulated (summed) budgets, including this one */
44 lt_t acc_time;
45 int expected_job;
46};
47
48struct ce_dom_data {
49 int cpu;
50 struct task_struct *scheduled, *should_schedule;
51 /*
52 * Each CPU needs a mapping of level A ID (integer) to struct pid so
53 * that we can get its task struct.
54 */
55 struct ce_dom_pid_entry pid_entries[CONFIG_PLUGIN_MC_LEVEL_A_MAX_TASKS];
56 int num_pid_entries;
57 lt_t cycle_time;
58 struct hrtimer_start_on_info timer_info;
59 struct hrtimer timer;
60};
61
37#endif /* __KERNEL__ */ 62#endif /* __KERNEL__ */
38 63
39#endif 64#endif