linux/arch/x86/kernel
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
..
acpi Merge branches 'acerhdf', 'acpi-pci-bind', 'bjorn-pci-root', 'bugzilla-12904', 'bugzilla-13121', 'bugzilla-13396', 'bugzilla-13533', 'bugzilla-13612', 'c3_lock', 'hid-cleanups', 'misc-2.6.31', 'pdc-leak-fix', 'pnpacpi', 'power_nocheck', 'thinkpad_acpi', 'video' and 'wmi' into release 2009-06-24 01:19:50 -04:00
apic x86: don't send an IPI to the empty set of CPU's 2009-08-21 09:23:57 -07:00
cpu x86, mcheck: Use correct cpumask for shared bank4 2009-09-03 15:10:08 -07:00
.gitignore arch/x86/kernel/.gitignore: Added vmlinux.lds to .gitignore file because it shouldn't be tracked. 2008-07-10 10:13:51 -07:00
alternative.c x86: expand irq-off region in text_poke() 2009-03-10 16:24:23 +01:00
amd_iommu.c x86: Mark device_nb as static and fix NULL noise 2009-07-01 16:52:53 +02:00
amd_iommu_init.c amd-iommu: set evt_buf_size correctly 2009-07-02 18:32:05 +02:00
aperture_64.c aperture_64.c: clarify that too small aperture is valid reason for this code 2008-11-28 15:24:39 +01:00
apm_32.c x86: Work around compilation warning in arch/x86/kernel/apm_32.c 2009-08-04 16:34:23 +02:00
asm-offsets.c i386: move kernel 2007-10-11 11:17:01 +02:00
asm-offsets_32.c lguest: optimize by coding restore_flags and irq_enable in assembler. 2009-06-12 22:27:03 +09:30
asm-offsets_64.c x86, boot: make kernel_alignment adjustable; new bzImage fields 2009-05-11 17:44:39 -07:00
audit_64.c x86_64: move kernel 2007-10-11 11:17:24 +02:00
bios_uv.c x86, UV: system table in bios accessed after unmap 2009-04-03 19:25:57 +02:00
bootflag.c x86: coding style cleanup for kernel/bootflag.c 2008-01-30 13:32:31 +01:00
check.c x86: fix 64k corruption-check 2009-03-15 07:03:15 +01:00
cpuid.c Driver Core: x86: add nodename for cpuid and msr drivers. 2009-06-15 21:30:25 -07:00
crash.c x86: disable IOMMUs on kernel crash 2009-06-15 15:20:40 +02:00
crash_dump_32.c kdump: make elfcorehdr_addr independent of CONFIG_PROC_VMCORE 2008-10-20 08:52:39 -07:00
crash_dump_64.c kdump: make elfcorehdr_addr independent of CONFIG_PROC_VMCORE 2008-10-20 08:52:39 -07:00
doublefault_32.c x86: fix virt_addr_valid() with CONFIG_DEBUG_VIRTUAL=y, v2 2008-10-13 10:33:15 +02:00
ds.c x86, ds: support Core i7 2009-04-07 13:36:36 +02:00
ds_selftest.c x86, ds: fix buffer alignment in debug store selftest 2009-04-24 10:18:51 +02:00
ds_selftest.h x86, bts: cleanups 2009-03-13 11:57:22 +01:00
dumpstack.c x86: Add sysctl to allow panic on IOCK NMI error 2009-06-25 22:06:11 +02:00
dumpstack.h x86: avoid multiple declaration of kstack_depth_to_print 2009-04-14 11:45:33 +02:00
dumpstack_32.c perf_counter: Ignore the nmi call frames in the x86-64 backtraces 2009-07-01 22:37:23 +02:00
dumpstack_64.c perf_counter: Ignore the nmi call frames in the x86-64 backtraces 2009-07-01 22:37:23 +02:00
e820.c Remove multiple KERN_ prefixes from printk formats 2009-07-08 10:30:03 -07:00
early-quirks.c x86 early quirks: eliminate unused function 2009-04-08 14:16:32 +02:00
early_printk.c x86: properly __init-annotate recent early_printk additions 2009-03-13 02:37:18 +01:00
efi.c x86: fix buffer overflow in efi_init() 2009-08-09 01:08:42 -07:00
efi_32.c x86: fix i486 suspend to disk CR4 oops 2008-08-18 08:50:19 +02:00
efi_64.c x86: Make 64-bit efi_ioremap use ioremap on MMIO regions 2009-08-03 13:34:25 -07:00
efi_stub_32.S Merge branches 'x86/acpi', 'x86/apic', 'x86/asm', 'x86/cleanups', 'x86/mm', 'x86/signal' and 'x86/urgent'; commit 'v2.6.29-rc6' into x86/core 2009-02-24 21:50:43 +01:00
efi_stub_64.S x86: efi_stub_32,64 - add missing ENDPROCs 2009-02-24 18:08:40 +01:00
entry_32.S Merge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-06-20 10:56:46 -07:00
entry_64.S function-graph: add stack frame test 2009-06-18 18:40:18 -04:00
ftrace.c function-graph: add stack frame test 2009-06-18 18:40:18 -04:00
geode_32.c x86, geode: add a VSA2 ID for General Software 2008-06-19 14:19:03 +02:00
head.c x86, debug: remove EBDA debug printk 2008-12-12 11:08:42 +01:00
head32.c x86-32: use brk segment for allocating initial kernel pagetable 2009-03-14 17:23:47 -07:00
head64.c x86: add brk allocation for very, very early allocations 2009-03-14 15:37:14 -07:00
head_32.S x86: fix section mismatch for i386 init code 2009-07-27 14:18:46 -07:00
head_64.S x86: de-assembler-ize asm/desc.h 2009-06-17 21:35:10 -07:00
hpet.c x86: hpet: Mark per cpu interrupts IRQF_TIMER to prevent resume failure 2009-06-14 18:24:29 +02:00
i386_ksyms_32.c ftrace: rename FTRACE to FUNCTION_TRACER 2008-10-20 18:27:03 +02:00
i387.c x86, math-emu: fix init_fpu for task != current 2009-03-04 20:33:16 +01:00
i8237.c i8327: fix outb() parameter order 2009-02-10 13:13:23 +01:00
i8253.c time: move PIT_TICK_RATE to linux/timex.h 2009-06-16 19:47:27 -07:00
i8259.c x86: refactor x86_quirks support 2009-02-23 00:08:11 +01:00
init_task.c mm: consolidate init_mm definition 2009-06-16 19:47:28 -07:00
io_delay.c x86: io_delay.c cleanup 2009-03-21 16:57:04 +05:30
ioport.c x86-32: use non-lazy io bitmap context switching 2009-03-02 12:07:48 +01:00
irq.c Merge branch 'linus' into x86/mce3 2009-06-11 23:31:52 +02:00
irq_32.c Merge branch 'tj-percpu' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc into core/percpu 2009-02-24 21:52:45 +01:00
irq_64.c x86: unify do_IRQ() 2009-02-09 12:16:05 +01:00
irqinit.c x86, mce: Rename incorrect macro name "CONFIG_X86_THRESHOLD" 2009-07-21 21:43:22 -07:00
k8.c x86, gart: fix gart detection for Fam11h CPUs 2008-10-28 17:10:27 +01:00
kdebugfs.c x86: kdebugfs.c cleanup 2009-03-21 16:55:45 +05:30
kgdb.c Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-06-10 15:49:10 -07:00
kprobes.c Merge branch 'tracing/core-v2' into tracing-for-linus 2009-04-02 00:49:02 +02:00
kvm.c x86, kvm: Fix section mismatches in kvm.c 2009-07-03 14:34:22 +02:00
kvmclock.c clocksource: pass clocksource to read() callback 2009-04-21 13:41:47 -07:00
ldt.c x86: ldt.c fix style problems 2009-01-02 17:46:24 +01:00
machine_kexec_32.c x86, kexec: fix crashdump panic with CONFIG_KEXEC_JUMP 2009-05-07 22:01:05 -07:00
machine_kexec_64.c x86, kexec: fix crashdump panic with CONFIG_KEXEC_JUMP 2009-05-07 22:01:05 -07:00
Makefile gcov: exclude code operating in userspace from profiling 2009-07-06 13:57:03 -07:00
mca_32.c x86: refactor x86_quirks support 2009-02-23 00:08:11 +01:00
mfgpt_32.c x86: geode: Mark mfgpt irq IRQF_TIMER to prevent resume failure 2009-07-24 08:42:52 +02:00
microcode_amd.c x86, microcode: Simplify vfree() use 2009-06-07 16:35:11 +02:00
microcode_core.c Driver Core: misc: add nodename support for misc devices. 2009-06-15 21:30:25 -07:00
microcode_intel.c x86: microcode: use smp_call_function_single instead of set_cpus_allowed, cleanup of synchronization logic 2009-05-12 10:36:44 +02:00
mmconf-fam10h_64.c x86: move various CPU initialization objects into .cpuinit.rodata 2009-03-12 13:13:07 +01:00
module.c module: cleanup FIXME comments about trimming exception table entries. 2009-06-12 21:47:05 +09:30
mpparse.c x86, irq: don't call mp_config_acpi_gsi() if update_mptable is not enabled 2009-05-18 09:33:29 +02:00
msr.c x86, msr: Export the register-setting MSR functions via /dev/*/msr 2009-08-31 16:16:04 -07:00
olpc.c x86, olpc: fix model detection without OFW 2009-02-14 23:05:25 +01:00
paravirt-spinlocks.c x86: remove byte locks 2009-01-20 17:14:28 +01:00
paravirt.c x86, msr: Rewrite AMD rd/wrmsr variants 2009-08-31 15:14:28 -07:00
paravirt_patch_32.c x86/pvops: add a paravirt_ident functions to allow special patching 2009-01-30 14:51:44 -08:00
paravirt_patch_64.c x86/pvops: add a paravirt_ident functions to allow special patching 2009-01-30 14:51:44 -08:00
pci-calgary_64.c x86: calgary: remove IOMMU_DEBUG 2009-04-14 13:03:36 +02:00
pci-dma.c intel-iommu: Make iommu=pt work on i386 too 2009-07-01 18:56:16 +01:00
pci-gart_64.c Remove multiple KERN_ prefixes from printk formats 2009-07-08 10:30:03 -07:00
pci-nommu.c dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
pci-swiotlb.c Merge git://git.infradead.org/~dwmw2/iommu-2.6.31 2009-06-22 21:38:22 -07:00
pcspeaker.c x86: use platform_device_register_simple() 2008-09-22 12:58:36 +02:00
pmtimer_64.c x86: move pmtmr related declarations 2008-01-30 13:30:18 +01:00
probe_roms_32.c x86: move mach-default/*.h files to asm/ 2009-01-29 14:16:51 +01:00
process.c kmemcheck: add mm functions 2009-06-15 12:40:03 +02:00
process_32.c 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
process_64.c 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
ptrace.c x86, bts, mm: clean up buffer allocation 2009-04-24 10:18:52 +02:00
pvclock.c x86: Fix warning in pvclock.c 2009-07-14 16:25:05 +02:00
quirks.c Merge branch 'linus' into x86/cpu 2009-06-07 12:22:15 +02:00
reboot.c x86: Add reboot quirk for every 5 series MacBook/Pro 2009-08-10 20:59:42 +02:00
reboot_fixups_32.c x86: constify data in reboot.c 2008-05-25 08:58:30 +02:00
relocate_kernel_32.S x86, kexec: fix kexec x86 coding style 2009-03-10 18:13:25 -07:00
relocate_kernel_64.S x86, kexec: x86_64: add kexec jump support for x86_64 2009-03-10 18:13:25 -07:00
rtc.c x86: rtc.c cleanup 2009-03-21 16:56:37 +05:30
scx200_32.c x86: fix sparse warning in kernel/scx200_32.c 2008-01-31 22:05:45 +01:00
setup.c x86: Add quirk for Intel DG45ID board to avoid low memory corruption 2009-07-18 13:38:29 +02:00
setup_percpu.c percpu, sparc64: fix sparse possible cpu map handling 2009-08-14 13:20:53 +09:00
signal.c Merge branch 'linus' into x86/mce3 2009-06-11 23:31:52 +02:00
smp.c Merge branch 'linus' into x86/mce3 2009-06-11 23:31:52 +02:00
smpboot.c x86, sched: Workaround broken sched domain creation for AMD Magny-Cours 2009-09-03 15:10:14 -07:00
stacktrace.c x86: add save_stack_trace_bp() for tracing from a specific stack frame 2009-06-12 23:01:05 +02:00
step.c x86 ptrace: user-sets-TF nits 2008-07-16 12:15:17 -07:00
sys_i386_32.c x86: Introducing asm/syscalls.h 2008-07-22 14:35:57 +02:00
sys_x86_64.c Merge branches 'x86/alternatives', 'x86/cleanups', 'x86/commandline', 'x86/crashdump', 'x86/debug', 'x86/defconfig', 'x86/doc', 'x86/exports', 'x86/fpu', 'x86/gart', 'x86/idle', 'x86/mm', 'x86/mtrr', 'x86/nmi-watchdog', 'x86/oprofile', 'x86/paravirt', 'x86/reboot', 'x86/sparse-fixes', 'x86/tsc', 'x86/urgent' and 'x86/vmalloc' into x86-v28-for-linus-phase1 2008-10-06 18:17:07 +02:00
syscall_64.c x86: Fix ASM_X86__ header guards 2008-10-22 22:55:23 -07:00
syscall_table_32.S Merge branch 'core/signal' into perfcounters/core 2009-04-30 21:16:49 +02:00
tce_64.c x86: Create clflush() inline, remove hardcoded wbinvd 2007-10-17 20:16:12 +02:00
test_nx.c x86: Explicitly include required header files. 2008-04-17 17:41:15 +02:00
test_rodata.c x86: include proper prototypes for rodata_test 2008-02-14 23:30:20 +01:00
time_32.c x86: refactor x86_quirks support 2009-02-23 00:08:11 +01:00
time_64.c cpumask: remove references to struct irqaction's mask field. 2009-03-30 22:05:14 +10:30
tlb_uv.c x86: Fix UV BAU destination subnode id 2009-08-15 11:58:02 +02:00
tls.c x86: Introducing asm/syscalls.h 2008-07-22 14:35:57 +02:00
tls.h x86: x86 user_regset TLS 2008-01-30 13:31:52 +01:00
topology.c x86: topology.c cleanup 2009-03-21 16:55:24 +05:30
trampoline.c x86: change static allocation of trampoline area 2008-12-08 13:49:45 +01:00
trampoline_32.S x86: use _types.h headers in asm where available 2009-02-13 11:35:01 -08:00
trampoline_64.S x86: use _types.h headers in asm where available 2009-02-13 11:35:01 -08:00
traps.c x86: Add sysctl to allow panic on IOCK NMI error 2009-06-25 22:06:11 +02:00
tsc.c x86: Fix serialization in pit_expect_msb() 2009-08-10 19:56:57 +02:00
tsc_sync.c x86: clean up arch/x86/kernel/tsc_sync.c a bit 2009-05-07 09:32:10 +02:00
uv_irq.c x86, UV: add uv_setup_irq() and uv_teardown_irq() functions, v3, fix 2008-10-16 16:53:13 +02:00
uv_sysfs.c x86: prevent /sys/firmware/sgi_uv from being created on non-uv systems 2009-04-08 14:58:10 +02:00
uv_time.c uv_time: add parameter to uv_read_rtc() 2009-04-22 17:41:25 +02:00
verify_cpu_64.S x86_64: move kernel 2007-10-11 11:17:24 +02:00
visws_quirks.c x86: convert obsolete irq_desc_t typedef to struct irq_desc 2009-03-11 09:49:01 +01:00
vm86_32.c Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-06-10 16:15:14 -07:00
vmi_32.c x86: Fix VMI && stack protector 2009-08-05 10:20:29 +02:00
vmiclock_32.c clocksource: pass clocksource to read() callback 2009-04-21 13:41:47 -07:00
vmlinux.lds.S x86: Fix assert syntax in vmlinux.lds.S 2009-08-03 14:44:54 -07:00
vsmp_64.c Revert "x86: don't compile vsmp_64 for 32bit" 2009-03-25 21:34:28 +01:00
vsyscall_64.c x86: move rdtsc_barrier() into the TSC vread method 2009-05-28 14:15:54 +02:00
x8664_ksyms_64.c x86: convert pda ops to wrappers around x86 percpu accessors 2009-01-16 14:20:22 +01:00
xsave.c x86-64: fix FPU corruption with signals and preemption 2009-04-20 14:33:00 -07:00