mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] sched: fix need_resched() when checking peempt
@ 2011-05-24 13:27 Hillf Danton
  2011-05-24 13:39 ` Steven Rostedt
  0 siblings, 1 reply; 8+ messages in thread
From: Hillf Danton @ 2011-05-24 13:27 UTC (permalink / raw)
  To: LKML
  Cc: Ingo Molnar, Peter Zijlstra, Steven Rostedt, Mike Galbraith, Yong Zhang

When checking if current task could be preempted by a newly woken task,
further check could be bypassed if the current thread is different from
the current task of run-queue, and it is corrected accordingly.

Signed-off-by: Hillf Danton <dhillf@gmail.com>
---

--- tip-git/kernel/sched_rt.c	Sun May 22 20:12:01 2011
+++ sched_rt.c	Tue May 24 20:31:27 2011
@@ -1074,7 +1074,7 @@ static void check_preempt_curr_rt(struct
 	 * to move current somewhere else, making room for our non-migratable
 	 * task.
 	 */
-	if (p->prio == rq->curr->prio && !need_resched())
+	if (p->prio == rq->curr->prio && !test_tsk_need_resched(rq->curr))
 		check_preempt_equal_prio(rq, p);
 #endif
 }

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-05-31 13:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-24 13:27 [PATCH] sched: fix need_resched() when checking peempt Hillf Danton
2011-05-24 13:39 ` Steven Rostedt
2011-05-24 13:50   ` Hillf Danton
2011-05-25  3:24     ` Yong Zhang
2011-05-25  4:34       ` Yong Zhang
2011-05-25  4:44         ` Mike Galbraith
2011-05-31  3:26     ` Mike Galbraith
2011-05-31 13:18       ` [PATCH resend] " Hillf Danton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome