diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-01-28 09:41:13 -0500 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-01-28 09:41:13 -0500 |
commit | dd2312f257e3ed4580881db1a466fbd4386e6117 (patch) | |
tree | 74fe3bed6c76b92797f29ab6279300cb40810012 /kernel/sched.c | |
parent | ca4a474ff184b93bc1d2c49b1d80edac844e65cf (diff) |
Revert f01618e24f233b4e7e12d66d0078ce513f4bad2d
Fix BUG introduced by f01618e24f233b4e7e12d66d0078ce513f4bad2d:
litmus_tick() must be called indipendenty of the currently executing task.
In Bjoern's words:
"The reason why we had litmus_tick() as a special case is that a plugin might
want to reschedule a non-RT task even if it is currently not executing a Litmus
RT task.
This is particularly a concern for non-work-conserving plugins such as PFAIR
(without early-releasing enabled). A 1/11 weight task does not execute most of
the time, but when it receives a quantum allocation, LITMUS needs to preempt
whatever non-Litmus task is currently executing.
In the case of PFAIR (and other quantum-driven schedulers), this requires the
tick function to be called on every quantum boundary (i.e., every time that the
periodic timer tick fires, no matter whether the currently executing task is a
Litmus task)."
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index fba05d79a519..18965cfada48 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -5265,6 +5265,10 @@ void scheduler_tick(void) | |||
5265 | update_rq_clock(rq); | 5265 | update_rq_clock(rq); |
5266 | update_cpu_load(rq); | 5266 | update_cpu_load(rq); |
5267 | curr->sched_class->task_tick(rq, curr, 0); | 5267 | curr->sched_class->task_tick(rq, curr, 0); |
5268 | |||
5269 | /* litmus_tick may force current to resched */ | ||
5270 | litmus_tick(rq, curr); | ||
5271 | |||
5268 | spin_unlock(&rq->lock); | 5272 | spin_unlock(&rq->lock); |
5269 | 5273 | ||
5270 | perf_event_task_tick(curr, cpu); | 5274 | perf_event_task_tick(curr, cpu); |