Re: [patch] Real-Time Preemption, -RT-2.6.12-rc6-V0.7.48-00

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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())

[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]
  Powered by Linux