public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michal Schmidt <xschmi00@stud.feec.vutbr.cz>
To: Milan Svoboda <milan.svoboda@centrum.cz>
Cc: linux-kernel@vger.kernel.org, simlo@phys.au.dk
Subject: Re: bug in Real-Time Preemption
Date: Fri, 10 Jun 2005 09:52:27 +0200	[thread overview]
Message-ID: <42A946BB.50108@stud.feec.vutbr.cz> (raw)
In-Reply-To: <200506100918.3335@centrum.cz>

[-- Attachment #1: Type: text/plain, Size: 397 bytes --]

Milan Svoboda wrote:
> under non RT preempt:
> (these results are expected)
> 
> ./a.out
> Flag: 0, Dif:11714
> ./a.out
> Flag: 0, Dif:11678
> 
> under full RT preempt:
> ./a.out
> Flag: 1, Dif:582536
> ./a.out
> Flag: 1, Dif:579791
> 
> This shows that thread with bigger priority was
> blocked by the thread with lower priority!

Can you retry with RT-V0.7.48-05 and this patch applied?

Michal

[-- Attachment #2: rt-fix-delayed-preemption-lags2.diff --]
[-- Type: text/plain, Size: 867 bytes --]

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

  parent reply	other threads:[~2005-06-10  7:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-10  7:18 bug in Real-Time Preemption Milan Svoboda
2005-06-10  7:46 ` Esben Nielsen
2005-06-10  7:52 ` Michal Schmidt [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-06-10  9:50 Milan Svoboda
2005-06-10  7:47 Milan Svoboda
2005-06-10  7:45 Milan Svoboda
2005-06-09 13:45 Milan Svoboda
2005-06-09 21:28 ` Esben Nielsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42A946BB.50108@stud.feec.vutbr.cz \
    --to=xschmi00@stud.feec.vutbr.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=milan.svoboda@centrum.cz \
    --cc=simlo@phys.au.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox