lkml.org 
[lkml]   [2005]   [Jun]   [9]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateThu, 09 Jun 2005 23:24:32 +0200
FromMichal Schmidt <>
SubjectRe: [patch] Real-Time Preemption, -RT-2.6.12-rc6-V0.7.48-00
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);
 		}
 	}
\
 
 \ /
  Last update: 2005-06-09 21:30    [from the cache]
©2003-2008