linux/arch/x86
Andreas Herrmann 5a925b4282 x86, sched: Workaround broken sched domain creation for AMD Magny-Cours
Current sched domain creation code can't handle multi-node processors.
When switching to power_savings scheduling errors show up and
system might hang later on (due to broken sched domain hierarchy):

  # echo 0  >> /sys/devices/system/cpu/sched_mc_power_savings
  CPU0 attaching sched-domain:
   domain 0: span 0-5 level MC
    groups: 0 1 2 3 4 5
    domain 1: span 0-23 level NODE
     groups: 0-5 6-11 18-23 12-17
  ...
  # echo 1  >> /sys/devices/system/cpu/sched_mc_power_savings
  CPU0 attaching sched-domain:
   domain 0: span 0-11 level MC
    groups: 0 1 2 3 4 5 6 7 8 9 10 11
  ERROR: parent span is not a superset of domain->span
    domain 1: span 0-5 level CPU
  ERROR: domain->groups does not contain CPU0
     groups: 6-11 (__cpu_power = 12288)
  ERROR: groups don't span domain->span
     domain 2: span 0-23 level NODE
      groups:
  ERROR: domain->cpu_power not set

  ERROR: groups don't span domain->span
  ...

Fixing all aspects of power-savings scheduling for Magny-Cours needs
some larger changes in the sched domain creation code.

As a short-term and temporary workaround avoid the problems by
extending "the worst possible hack" ;-(
and always use llc_shared_map on AMD Magny-Cours when MC domain span
is calculated.

With this I get:

  # echo 1  >> /sys/devices/system/cpu/sched_mc_power_savings
  CPU0 attaching sched-domain:
   domain 0: span 0-5 level MC
    groups: 0 1 2 3 4 5
    domain 1: span 0-5 level CPU
     groups: 0-5 (__cpu_power = 6144)
     domain 2: span 0-23 level NODE
      groups: 0-5 (__cpu_power = 6144) 6-11 (__cpu_power = 6144) 18-23 (__cpu_power = 6144) 12-17 (__cpu_power = 6144)
  ...

I.e. no errors during sched domain creation, no system hangs, and also
mc_power_savings scheduling works to a certain extend.

Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-09-03 15:10:14 -07:00
..
boot x86: fix usage of bios intcall() 2009-07-04 12:56:32 -07:00
configs Merge branch 'x86-kbuild-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-06-10 15:30:41 -07:00
crypto x86: Move kernel_fpu_using to irq_fpu_usable in asm/i387.h 2009-09-01 21:39:15 -07:00
ia32 Merge branch 'core/signal' into perfcounters/core 2009-04-30 21:16:49 +02:00
include/asm x86: Fix CPU llc_shared_map information for AMD Magny-Cours 2009-09-03 15:09:59 -07:00
kernel x86, sched: Workaround broken sched domain creation for AMD Magny-Cours 2009-09-03 15:10:14 -07:00
kvm KVM: MMU: limit rmap chain length 2009-08-06 12:06:54 +03:00
lguest lguest: update commentry 2009-07-30 16:03:46 +09:30
lib x86, msr: Fix msr-reg.S compilation with gas 2.16.1, on 32-bit too 2009-09-03 21:26:34 +02:00
math-emu Merge branch 'core/percpu' into percpu-cpumask-x86-for-linus-2 2009-03-27 17:28:43 +01:00
mm x86: don't call '->send_IPI_mask()' with an empty mask 2009-08-21 09:48:10 -07:00
oprofile x86/oprofile: rename kernel parameter for architectural perfmon to arch_perfmon 2009-07-10 05:22:50 +02:00
pci x86/pci: insert ioapic resource before assigning unassigned resources 2009-07-10 13:03:14 -07:00
power x86: Fix resume from suspend when CONFIG_CC_STACKPROTECTOR 2009-07-08 13:20:13 +02:00
vdso gcov: enable GCOV_PROFILE_ALL for x86_64 2009-06-18 13:03:58 -07:00
video x86: video/fbdev.c: add MODULE_LICENSE 2008-05-04 20:04:46 +02:00
xen x86, msr: Have the _safe MSR functions return -EIO, not -EFAULT 2009-08-31 15:15:23 -07:00
Kbuild x86: standardize Kbuild rules 2009-04-16 18:09:02 +02:00
Kconfig perf_counter, x86: Fix/improve apic fallback 2009-08-12 14:12:49 +02:00
Kconfig.cpu x86: add specific support for Intel Atom architecture 2009-08-23 11:20:02 +02:00
Kconfig.debug Merge branch 'tracing-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-06-10 19:53:40 -07:00
Makefile x86: add specific support for Intel Atom architecture 2009-08-23 11:20:02 +02:00
Makefile_32.cpu x86: add specific support for Intel Atom architecture 2009-08-23 11:20:02 +02:00