diff options
Diffstat (limited to 'litmus/sched_edf_hsb.c')
-rw-r--r-- | litmus/sched_edf_hsb.c | 42 |
1 files changed, 27 insertions, 15 deletions
diff --git a/litmus/sched_edf_hsb.c b/litmus/sched_edf_hsb.c index cd03cd748c60..7f944d1d97f0 100644 --- a/litmus/sched_edf_hsb.c +++ b/litmus/sched_edf_hsb.c | |||
@@ -2125,23 +2125,13 @@ static void edf_hsb_task_new(struct task_struct *task, int on_rq, int running) | |||
2125 | 2125 | ||
2126 | static void edf_hsb_task_wake_up(struct task_struct *task) | 2126 | static void edf_hsb_task_wake_up(struct task_struct *task) |
2127 | { | 2127 | { |
2128 | lt_t now; | ||
2128 | unsigned long flags; | 2129 | unsigned long flags; |
2129 | cpu_entry_t *entry = task_sched_entry(task); | 2130 | cpu_entry_t *entry = task_sched_entry(task); |
2130 | 2131 | ||
2131 | |||
2132 | TRACE_TASK(task, "wake_up at %llu on %d, %d\n", TIME(litmus_clock()), | 2132 | TRACE_TASK(task, "wake_up at %llu on %d, %d\n", TIME(litmus_clock()), |
2133 | task_cpu(task), task->rt_param.task_params.cpu); | 2133 | task_cpu(task), task->rt_param.task_params.cpu); |
2134 | 2134 | ||
2135 | set_rt_flags(task, RT_F_RUNNING); | ||
2136 | |||
2137 | /* The job blocked while it was being run by a slack server */ | ||
2138 | if (is_queued(task)) { | ||
2139 | check_slack_candidate(task); | ||
2140 | return; | ||
2141 | } | ||
2142 | |||
2143 | //BUG_ON(entry->scheduled == task); | ||
2144 | |||
2145 | raw_spin_lock_irqsave(global_lock, flags); | 2135 | raw_spin_lock_irqsave(global_lock, flags); |
2146 | 2136 | ||
2147 | /* A task set was released. Start servers. */ | 2137 | /* A task set was released. Start servers. */ |
@@ -2149,10 +2139,32 @@ static void edf_hsb_task_wake_up(struct task_struct *task) | |||
2149 | start_servers(get_deadline(task) - get_rt_period(task) - | 2139 | start_servers(get_deadline(task) - get_rt_period(task) - |
2150 | get_rt_phase(task)); | 2140 | get_rt_phase(task)); |
2151 | 2141 | ||
2152 | /* Note that since we are not re-releasing a task here, we have | 2142 | if (!is_be(task)) { |
2153 | * switched from the sporadic to the periodic task model. See | 2143 | /* Non-BE tasks are not sporadic in this model */ |
2154 | * sched_gsn_edf.c for the sporadic version. | 2144 | set_rt_flags(task, RT_F_RUNNING); |
2155 | */ | 2145 | |
2146 | /* The job blocked while it was being run by a slack server */ | ||
2147 | if (is_queued(task)) { | ||
2148 | check_slack_candidate(task); | ||
2149 | raw_spin_unlock_irqrestore(global_lock, flags); | ||
2150 | return; | ||
2151 | } | ||
2152 | } else { | ||
2153 | /* Treat BE tasks as sporadic */ | ||
2154 | if (get_rt_flags(task) == RT_F_EXIT_SEM) { | ||
2155 | set_rt_flags(task, RT_F_RUNNING); | ||
2156 | } else { | ||
2157 | now = litmus_clock(); | ||
2158 | if (is_tardy(task, now)) { | ||
2159 | /* New sporadic release */ | ||
2160 | release_at(task, now); | ||
2161 | sched_trace_task_release(task); | ||
2162 | } else if (task->rt.time_slice) { | ||
2163 | /* Came back before deadline */ | ||
2164 | set_rt_flags(task, RT_F_RUNNING); | ||
2165 | } | ||
2166 | } | ||
2167 | } | ||
2156 | 2168 | ||
2157 | job_arrival(task, entry); | 2169 | job_arrival(task, entry); |
2158 | 2170 | ||