* [PATCH] rq->curr==p not equivalent to task_running(rq,p)
@ 2004-01-13 23:02 Joe Korty
2004-01-13 23:49 ` Robert Love
2004-01-14 8:55 ` Ingo Molnar
0 siblings, 2 replies; 3+ messages in thread
From: Joe Korty @ 2004-01-13 23:02 UTC (permalink / raw)
To: rml, mingo; +Cc: linux-kernel
task_running(rq,p) is equivalent to (rq->curr == p) only for some
architectures. Boot tested on i386.
Regards,
Joe
diff -Nua 2.6/kernel/sched.c.0 2.6/kernel/sched.c
--- 2.6/kernel/sched.c.0 2004-01-13 17:53:34.000000000 -0500
+++ 2.6/kernel/sched.c 2004-01-13 17:47:33.000000000 -0500
@@ -2062,7 +2062,7 @@
* our priority decreased, or if we are not currently running on
* this runqueue and our priority is higher than the current's
*/
- if (rq->curr == p) {
+ if (task_running(rq, p)) {
if (p->prio > oldprio)
resched_task(rq->curr);
} else if (p->prio < rq->curr->prio)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] rq->curr==p not equivalent to task_running(rq,p)
2004-01-13 23:02 [PATCH] rq->curr==p not equivalent to task_running(rq,p) Joe Korty
@ 2004-01-13 23:49 ` Robert Love
2004-01-14 8:55 ` Ingo Molnar
1 sibling, 0 replies; 3+ messages in thread
From: Robert Love @ 2004-01-13 23:49 UTC (permalink / raw)
To: joe.korty, akpm; +Cc: mingo, linux-kernel
On Tue, 2004-01-13 at 18:02, Joe Korty wrote:
> task_running(rq,p) is equivalent to (rq->curr == p) only for some
> architectures. Boot tested on i386.
Oh, good catch.
Andrew, mind taking this?
Thanks, Joe.
Robert Love
diff -Nua 2.6/kernel/sched.c.0 2.6/kernel/sched.c
--- 2.6/kernel/sched.c.0 2004-01-13 17:53:34.000000000 -0500
+++ 2.6/kernel/sched.c 2004-01-13 17:47:33.000000000 -0500
@@ -2062,7 +2062,7 @@
* our priority decreased, or if we are not currently running on
* this runqueue and our priority is higher than the current's
*/
- if (rq->curr == p) {
+ if (task_running(rq, p)) {
if (p->prio > oldprio)
resched_task(rq->curr);
} else if (p->prio < rq->curr->prio)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] rq->curr==p not equivalent to task_running(rq,p)
2004-01-13 23:02 [PATCH] rq->curr==p not equivalent to task_running(rq,p) Joe Korty
2004-01-13 23:49 ` Robert Love
@ 2004-01-14 8:55 ` Ingo Molnar
1 sibling, 0 replies; 3+ messages in thread
From: Ingo Molnar @ 2004-01-14 8:55 UTC (permalink / raw)
To: Joe Korty; +Cc: rml, linux-kernel, Andrew Morton
* Joe Korty <joe.korty@ccur.com> wrote:
> task_running(rq,p) is equivalent to (rq->curr == p) only for some
> architectures. Boot tested on i386.
> - if (rq->curr == p) {
> + if (task_running(rq, p)) {
indeed - good catch. Andrew, please apply.
Ingo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-01-14 8:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-13 23:02 [PATCH] rq->curr==p not equivalent to task_running(rq,p) Joe Korty
2004-01-13 23:49 ` Robert Love
2004-01-14 8:55 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox