Hi Ingo,
Since the introduction of the delayed preemption feature in V0.7.47-20
my KDE desktop has been jerky. The sound from artsd often skips. The
mouse pointer jumps when I compile anything the background and try to
browse the web with Firefox.
I think that try_to_wake_up is broken for the !sync case. We have:
__activate_task(p, rq);
if (TASK_PREEMPTS_CURR(p, rq)) {
if (sync)
set_tsk_need_resched_delayed(rq->curr);
else
resched_task(rq->curr);
}
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.
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:07:43.000000000 +0200
@@ -1195,11 +1195,13 @@ out_activate:
if (TASK_PREEMPTS_CURR(p, rq))
resched_task(rq->curr);
} else {
- __activate_task(p, rq);
- if (TASK_PREEMPTS_CURR(p, rq)) {
- if (sync)
+ if (sync) {
+ __activate_task(p, rq);
+ if (TASK_PREEMPTS_CURR(p, rq))
set_tsk_need_resched_delayed(rq->curr);
- else
+ } else {
+ activate_task(p, rq, cpu == this_cpu);
+ if (TASK_PREEMPTS_CURR(p, rq))
resched_task(rq->curr);
}
}
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]