diff options
author | Christopher Kenna <cjk@cs.unc.edu> | 2011-09-30 01:23:20 -0400 |
---|---|---|
committer | Christopher Kenna <cjk@cs.unc.edu> | 2011-09-30 01:23:20 -0400 |
commit | cd5685b6483df2f1ba8affc0ff8a0679f4044db8 (patch) | |
tree | b2c15c6f04fdfd96a738900d8e822057847ea641 /include/litmus/sched_mc.h | |
parent | 23a00b911b968c6290251913ecc34171836b4d32 (diff) |
Refactor timer merging and add it to CE plugin.
THIS CODE IS UNTESTED
We now initialize one event group for each cpu on system start. We can
get the event group for a CPU via a function in event_group.c
Another change is that an event now stores what group it is in when it
add_event() is called on it. This lets us cancel it without knowing what
event group it is in.
The above is important because Level-C events (like releases) have a
NULL event group. When calling add_event(), it will get the event group
of the current CPU. If the event needs to be canceled later, we need
that saved group in the event so we know where to remove it from.
Diffstat (limited to 'include/litmus/sched_mc.h')
-rw-r--r-- | include/litmus/sched_mc.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/include/litmus/sched_mc.h b/include/litmus/sched_mc.h index 95cc367c8ade..7088c0766db2 100644 --- a/include/litmus/sched_mc.h +++ b/include/litmus/sched_mc.h | |||
@@ -51,12 +51,12 @@ struct mc_data { | |||
51 | struct ce_dom_data { | 51 | struct ce_dom_data { |
52 | int cpu; | 52 | int cpu; |
53 | struct task_struct *scheduled, *should_schedule; | 53 | struct task_struct *scheduled, *should_schedule; |
54 | /* | 54 | #ifdef CONFIG_MERGE_TIMERS |
55 | * Each CPU needs a mapping of level A ID (integer) to struct pid so | 55 | struct rt_event event; |
56 | * that we can get its task struct. | 56 | #else |
57 | */ | ||
58 | struct hrtimer_start_on_info timer_info; | 57 | struct hrtimer_start_on_info timer_info; |
59 | struct hrtimer timer; | 58 | struct hrtimer timer; |
59 | #endif | ||
60 | }; | 60 | }; |
61 | 61 | ||
62 | /** | 62 | /** |
@@ -65,7 +65,8 @@ struct ce_dom_data { | |||
65 | * @linked Logically running task, ghost or regular | 65 | * @linked Logically running task, ghost or regular |
66 | * @domain Domain from which to draw tasks | 66 | * @domain Domain from which to draw tasks |
67 | * @usable False if a higher criticality task is running | 67 | * @usable False if a higher criticality task is running |
68 | * @timer For ghost task budget enforcement | 68 | * @event For ghost task budget enforcement (merge timers) |
69 | * @timer For ghost task budget enforcement (not merge timers) | ||
69 | * @node Used to sort crit_entries by preemptability in global domains | 70 | * @node Used to sort crit_entries by preemptability in global domains |
70 | */ | 71 | */ |
71 | struct crit_entry { | 72 | struct crit_entry { |
@@ -105,7 +106,7 @@ unsigned int mc_ce_get_expected_job(const int, const int); | |||
105 | */ | 106 | */ |
106 | long mc_ce_admit_task_common(struct task_struct*); | 107 | long mc_ce_admit_task_common(struct task_struct*); |
107 | void mc_ce_task_exit_common(struct task_struct*); | 108 | void mc_ce_task_exit_common(struct task_struct*); |
108 | void mc_ce_timer_callback_common(domain_t*, struct hrtimer*); | 109 | lt_t mc_ce_timer_callback_common(domain_t*); |
109 | void mc_ce_release_at_common(struct task_struct*, lt_t); | 110 | void mc_ce_release_at_common(struct task_struct*, lt_t); |
110 | long mc_ce_activate_plugin_common(void); | 111 | long mc_ce_activate_plugin_common(void); |
111 | long mc_ce_deactivate_plugin_common(void); | 112 | long mc_ce_deactivate_plugin_common(void); |