![]() | |||||||||||||
Messages in this thread
Patch in this message |
I wrote:
> Shouldn't we call the full activate_task(...) instead of
> __activate_task(...) in the !sync case?
>
>
> The attached patch fixes seems to fix it for me. It is against V0.7.48-05.
This patch should work the same and is a bit nicer.
Michal
diff -Nurp -X linux-RT/Documentation/dontdiff linux-RT/kernel/sched.c linux-RT.mich/kernel/sched.c
--- linux-RT/kernel/sched.c 2005-06-09 23:09:43.000000000 +0200
+++ linux-RT.mich/kernel/sched.c 2005-06-09 23:29:20.000000000 +0200
@@ -1190,18 +1190,14 @@ out_activate:
* this cpu. Delayed preemption is guaranteed to happen upon
* return to userspace.
*/
- if (cpu != this_cpu) {
+ if (!sync || cpu != this_cpu) {
activate_task(p, rq, cpu == this_cpu);
if (TASK_PREEMPTS_CURR(p, rq))
resched_task(rq->curr);
} else {
__activate_task(p, rq);
- if (TASK_PREEMPTS_CURR(p, rq)) {
- if (sync)
- set_tsk_need_resched_delayed(rq->curr);
- else
- resched_task(rq->curr);
- }
+ if (TASK_PREEMPTS_CURR(p, rq))
+ set_tsk_need_resched_delayed(rq->curr);
}
trace_start_sched_wakeup(p, rq);
if (rq->curr && p && rq && _need_resched()) | ||||||||||||
| Last update: 2005-06-09 21:40 [from the cache] ©2003-2008 | |||||||||||||