diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2011-10-08 20:59:23 -0400 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2011-10-08 20:59:23 -0400 |
commit | 5177128caca8a03d19c293de841ce05070b1c7e9 (patch) | |
tree | d23b0515b6fe39df9a02f05b21ba6fb358be2cfb /include | |
parent | 5a2b8be93c93f2c66edee2a8aff1554778959e35 (diff) |
Allow scheduler to 'logically' remove crit_entry's from level-C heap.
This required fixes to hrtimer_start_on code so that events can be cancelled
or re-armed while an hrtimer pull is in progress.
Diffstat (limited to 'include')
-rw-r--r-- | include/litmus/sched_mc.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/include/litmus/sched_mc.h b/include/litmus/sched_mc.h index d67a7bfc470c..0a1b3f0c718c 100644 --- a/include/litmus/sched_mc.h +++ b/include/litmus/sched_mc.h | |||
@@ -26,7 +26,6 @@ struct mc_job { | |||
26 | * These are used only in the kernel. Userspace programs like RTSpin won't see | 26 | * These are used only in the kernel. Userspace programs like RTSpin won't see |
27 | * them. | 27 | * them. |
28 | */ | 28 | */ |
29 | |||
30 | struct mc_data { | 29 | struct mc_data { |
31 | struct mc_task mc_task; | 30 | struct mc_task mc_task; |
32 | struct mc_job mc_job; | 31 | struct mc_job mc_job; |
@@ -62,6 +61,22 @@ struct ce_dom_data { | |||
62 | }; | 61 | }; |
63 | 62 | ||
64 | /** | 63 | /** |
64 | * enum crit_state - Logically add / remove CPUs from criticality levels. | ||
65 | * | ||
66 | * Global crit levels need to use a two step process to remove CPUs so | ||
67 | * that the CPUs can be removed without holding domain locks. | ||
68 | * | ||
69 | * @CS_ACTIVE The criticality entry can run a task | ||
70 | * @CS_ACTIVATE The criticality entry can run a task, but hasn't had its | ||
71 | * position updated in a global heap. Set with ONLY CPU lock. | ||
72 | * @CS_REMOVE The criticality entry is logically removed, but hasn't had its | ||
73 | * position adjusted in a global heap. This should be set when | ||
74 | * ONLY the CPU state is locked. | ||
75 | * @CS_REMOVED The criticality entry has been removed from the crit level | ||
76 | */ | ||
77 | enum crit_state { CS_ACTIVE, CS_ACTIVATE, CS_REMOVE, CS_REMOVED }; | ||
78 | |||
79 | /** | ||
65 | * struct crit_entry - State of a CPU within each criticality level system. | 80 | * struct crit_entry - State of a CPU within each criticality level system. |
66 | * @level Criticality level of this entry | 81 | * @level Criticality level of this entry |
67 | * @linked Logically running task, ghost or regular | 82 | * @linked Logically running task, ghost or regular |
@@ -75,7 +90,7 @@ struct crit_entry { | |||
75 | enum crit_level level; | 90 | enum crit_level level; |
76 | struct task_struct* linked; | 91 | struct task_struct* linked; |
77 | struct domain* domain; | 92 | struct domain* domain; |
78 | int usable; | 93 | enum crit_state state; |
79 | #ifdef CONFIG_MERGE_TIMERS | 94 | #ifdef CONFIG_MERGE_TIMERS |
80 | struct rt_event event; | 95 | struct rt_event event; |
81 | #else | 96 | #else |