Thread (28 messages) 28 messages, 7 authors, 2007-03-19

Re: [patch 1/6 -rt] powerpc 2.6.20-rt8: add preemption checks for NEED_RESCHED_DELAYED.

flat view

From: Sergei Shtylyov <hidden>
Date: 2007-03-16 19:20:41
Also in: lkml

Hello.

Tsutomu OWA wrote:
  To add preemption checks for the NEED_RESCHED_DELAYED flag.
quoted hunk ↗ jump to hunk
diff -rup linux-rt8/arch/powerpc/kernel/idle.c rt/arch/powerpc/kernel/idle.c
--- linux-rt8/arch/powerpc/kernel/idle.c	2007-02-20 14:30:38.000000000 +0900
+++ rt/arch/powerpc/kernel/idle.c	2007-02-20 15:43:04.000000000 +0900
@@ -56,7 +56,8 @@ void cpu_idle(void)
 
 	set_thread_flag(TIF_POLLING_NRFLAG);
 	while (1) {
-		while (!need_resched() && !cpu_should_die()) {
+		while (!need_resched() && !need_resched_delayed() &&
+				!cpu_should_die()) {
 			ppc64_runlatch_off();
 
 			if (ppc_md.power_save) {
   Argh, I've missed this one! :-(
   But shouldn't we also add !need_resched_delayed() to another place below?

if (ppc_md.power_save)  {
[...]
	if (!need_resched() && !cpu_should_die())

WBR, Sergei
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help