CEDE on non-SMT
PATCH 1/1 CEDE on non-SMT
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.
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: