public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* sched_mc_power_savings broken with CGROUPS+CPUSETS
@ 2008-08-29 13:15 Vaidyanathan Srinivasan
  2008-08-29 13:23 ` Peter Zijlstra
  2008-08-29 20:17 ` Max Krasnyansky
  0 siblings, 2 replies; 9+ messages in thread
From: Vaidyanathan Srinivasan @ 2008-08-29 13:15 UTC (permalink / raw)
  To: Linux Kernel
  Cc: Ingo Molnar, Peter Zijlstra, Gautham R Shenoy, Balbir Singh,
	Suresh B Siddha, Venkatesh Pallipadi

Hi,

sched_mc_power_savings seems to be broken with CGROUPS+CPUSETS.
When CONFIG_CPUSETS=y the attached BUG_ON() is being hit.

I added a BUG_ON to check if SD_POWERSAVINGS_BALANCE is set at
SD_LV_CPU whenever sched_mc_power_savings is set.

This BUG is hit when config CONFIG_CPUSETS (depends on CONFIG_CGROUPS)
is just compiled in while this is never hit when they are compiled
out.  The fact that SD_POWERSAVINGS_BALANCE being cleared even when
sched_mc_power_savings = 1 completely breaks the
sched_mc_power_savings heuristics.

To recreate the problem, 
Have sched_mc power savings enabled CONFIG_SCHED_MC=y
Add this BUG_ON()

echo 1 > /sys/devices/system/cpu/sched_mc_power_savings

Try these these on a multi core x86 box.

sched_mc_power_savings seems to be broken from 2.6.26-rc1, but
I do not have a confirmation that the root cause is same in all
successive versions. sched_mc_power_savings works perfect in 
2.6.25.

Please help me root cause the issue.  Please point me to changes that
may potential cause this bug.

Thanks,
Vaidy

Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>

Index: linux-2.6.27-rc5/kernel/sched.c
===================================================================
--- linux-2.6.27-rc5.orig/kernel/sched.c	2008-08-29 17:48:56.000000000 +0000
+++ linux-2.6.27-rc5/kernel/sched.c	2008-08-29 18:16:09.000000000 +0000
@@ -3375,6 +3375,8 @@
 
 out_balanced:
 #if defined(CONFIG_SCHED_MC) || defined(CONFIG_SCHED_SMT)
+	BUG_ON(sched_mc_power_savings && sd->level == SD_LV_CPU && 
+		!(sd->flags & SD_POWERSAVINGS_BALANCE)); 
 	if (idle == CPU_NOT_IDLE || !(sd->flags & SD_POWERSAVINGS_BALANCE))
 		goto ret;
 

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

end of thread, other threads:[~2008-08-30 21:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-29 13:15 sched_mc_power_savings broken with CGROUPS+CPUSETS Vaidyanathan Srinivasan
2008-08-29 13:23 ` Peter Zijlstra
2008-08-29 14:05   ` Vaidyanathan Srinivasan
2008-08-29 20:29   ` Max Krasnyansky
2008-08-30 11:26     ` Peter Zijlstra
2008-08-30 20:42       ` Vaidyanathan Srinivasan
2008-08-30 21:43         ` Peter Zijlstra
2008-08-29 20:17 ` Max Krasnyansky
2008-08-30 20:02   ` Vaidyanathan Srinivasan

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