[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linuxppc-dev
Subject:    [PATCH] CEDE on non-SMT
From:       moilanen () austin ! ibm ! com (Jake Moilanen)
Date:       2006-07-25 20:11:47
Message-ID: 1153858308.29826.148.camel () goblue
[Download RAW message or body]

On the JS21 systems, they have the SPLPAR hypertas set, but are not SMT
capable.  So, they are not making the h_cede call.  This is causing the
hypervisor to have to queue up work for the hdecr, taking an excessive
amount of time in maintenance code, and causing jitter on the box.

Making the h_cede call helps alleviate that problem.

Signed-off-by: Jake Moilanen <moilanen at austin.ibm.com> 

Index: 2.6-msi/arch/powerpc/platforms/pseries/setup.c
===================================================================
--- 2.6-msi.orig/arch/powerpc/platforms/pseries/setup.c	2006-07-25
14:49:26.000000000 -0500
+++ 2.6-msi/arch/powerpc/platforms/pseries/setup.c	2006-07-25
14:52:49.000000000 -0500
@@ -501,7 +501,8 @@
 	}
 
 	/*
-	 * Cede if the other thread is not idle, so that it can
+	 * If not SMT, cede processor.  If CPU is running SMT
+	 * cede if the other thread is not idle, so that it can
 	 * go single-threaded.  If the other thread is idle,
 	 * we ask the hypervisor if it has pending work it
 	 * wants to do and cede if it does.  Otherwise we keep
@@ -514,7 +515,8 @@
 	 * very low priority.  The cede enables interrupts, which
 	 * doesn't matter here.
 	 */
-	if (!lppaca[cpu ^ 1].idle || poll_pending() == H_PENDING)
+	if (!cpu_has_feature(CPU_FTR_SMT) || !lppaca[cpu ^ 1].idle
+	    || poll_pending() == H_PENDING)
 		cede_processor();
 
 out:




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic