lkml.org 
[lkml]   [2005]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [patch] Real-Time Preemption, -RT-2.6.12-rc6-V0.7.48-00
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 23:40    [W:0.274 / U:4.036 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site