diff options
author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2008-05-01 11:24:14 -0400 |
---|---|---|
committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2008-05-01 11:24:14 -0400 |
commit | 67a8d367109c52518f754980d2b23100ca4fd051 (patch) | |
tree | a24f46a40887998ed96ace068022390d573b14c4 | |
parent | a53e6c2568dd9e5799dfb812afdec6f3ade03e91 (diff) |
LITMUS: let plugins declare their willingness to allow synchronization
- don't let SRP be active under GSN-EDF
- later, don't let FMLP be active under PFAIR, either
-rw-r--r-- | include/litmus/sched_plugin.h | 12 | ||||
-rw-r--r-- | litmus/sched_gsn_edf.c | 1 | ||||
-rw-r--r-- | litmus/sched_psn_edf.c | 2 |
3 files changed, 15 insertions, 0 deletions
diff --git a/include/litmus/sched_plugin.h b/include/litmus/sched_plugin.h index 421c54f517..872a7cbff3 100644 --- a/include/litmus/sched_plugin.h +++ b/include/litmus/sched_plugin.h | |||
@@ -85,6 +85,8 @@ struct sched_plugin { | |||
85 | struct list_head list; | 85 | struct list_head list; |
86 | /* basic info */ | 86 | /* basic info */ |
87 | char *plugin_name; | 87 | char *plugin_name; |
88 | unsigned int srp_active; | ||
89 | unsigned int fmlp_active; | ||
88 | 90 | ||
89 | /* scheduler invocation */ | 91 | /* scheduler invocation */ |
90 | scheduler_tick_t tick; | 92 | scheduler_tick_t tick; |
@@ -115,4 +117,14 @@ int register_sched_plugin(struct sched_plugin* plugin); | |||
115 | struct sched_plugin* find_sched_plugin(const char* name); | 117 | struct sched_plugin* find_sched_plugin(const char* name); |
116 | int print_sched_plugins(char* buf, int max); | 118 | int print_sched_plugins(char* buf, int max); |
117 | 119 | ||
120 | static inline int srp_active(void) | ||
121 | { | ||
122 | return litmus->srp_active; | ||
123 | } | ||
124 | |||
125 | static inline int fmlp_active(void) | ||
126 | { | ||
127 | return litmus->fmlp_active; | ||
128 | } | ||
129 | |||
118 | #endif | 130 | #endif |
diff --git a/litmus/sched_gsn_edf.c b/litmus/sched_gsn_edf.c index 6d9539cc0b..5dcc250aa6 100644 --- a/litmus/sched_gsn_edf.c +++ b/litmus/sched_gsn_edf.c | |||
@@ -695,6 +695,7 @@ static long gsnedf_admit_task(struct task_struct* tsk) | |||
695 | /* Plugin object */ | 695 | /* Plugin object */ |
696 | static struct sched_plugin gsn_edf_plugin __cacheline_aligned_in_smp = { | 696 | static struct sched_plugin gsn_edf_plugin __cacheline_aligned_in_smp = { |
697 | .plugin_name = "GSN-EDF", | 697 | .plugin_name = "GSN-EDF", |
698 | .fmlp_active = 1, | ||
698 | .finish_switch = gsnedf_finish_switch, | 699 | .finish_switch = gsnedf_finish_switch, |
699 | .tick = gsnedf_tick, | 700 | .tick = gsnedf_tick, |
700 | .task_new = gsnedf_task_new, | 701 | .task_new = gsnedf_task_new, |
diff --git a/litmus/sched_psn_edf.c b/litmus/sched_psn_edf.c index 7fb61ff75a..d4d01789b0 100644 --- a/litmus/sched_psn_edf.c +++ b/litmus/sched_psn_edf.c | |||
@@ -436,6 +436,8 @@ static long psnedf_admit_task(struct task_struct* tsk) | |||
436 | /* Plugin object */ | 436 | /* Plugin object */ |
437 | static struct sched_plugin psn_edf_plugin __cacheline_aligned_in_smp = { | 437 | static struct sched_plugin psn_edf_plugin __cacheline_aligned_in_smp = { |
438 | .plugin_name = "PSN-EDF", | 438 | .plugin_name = "PSN-EDF", |
439 | .fmlp_active = 1, | ||
440 | .srp_active = 1, | ||
439 | .tick = psnedf_tick, | 441 | .tick = psnedf_tick, |
440 | .task_new = psnedf_task_new, | 442 | .task_new = psnedf_task_new, |
441 | .complete_job = complete_job, | 443 | .complete_job = complete_job, |