kernel_optimize_test/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
configs
crypto x86: Move kernel_fpu_using to irq_fpu_usable in asm/i387.h 2009-09-01 21:39:15 -07:00
ia32
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
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
mm x86: don't call '->send_IPI_mask()' with an empty mask 2009-08-21 09:48:10 -07:00
oprofile
pci
power
vdso
video
xen x86, msr: Have the _safe MSR functions return -EIO, not -EFAULT 2009-08-31 15:15:23 -07:00
Kbuild
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
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