]> git.hungrycats.org Git - linux/commit
[PATCH] sched: fix SCHED_SMT & numa=fake=2 lockup
authorIngo Molnar <mingo@elte.hu>
Mon, 18 Oct 2004 16:11:52 +0000 (09:11 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 18 Oct 2004 16:11:52 +0000 (09:11 -0700)
commit7a9a3e863d834b3c9abf46b7921654f16343b5bc
tree0193173bb201fb05769d1c827601d5a15801d4e6
parentad5f30c47dc5216d4437621e53471170a55198ec
[PATCH] sched: fix SCHED_SMT & numa=fake=2 lockup

This patch fixes an interaction between the numa=fake=<domains> feature,
the domain setup code and cpu_siblings_map[].  The bug leads to a bootup
crash when using numa=fake=2 on a 2-way/4-way SMP+HT box.

When SCHED_SMT is turned on the domains-setup code relies on siblings not
spanning multiple domains (which makes perfect sense).  But numa=fake=2
creates an assymetric 1101/0010 splitup between CPUs, which results in two
siblings being on different nodes.

The patch adds a check_siblings_map() function that checks the sibling maps
and fixes them up if they violate this rule.  (it also prints a warning in
that case.)

The patch also turns SCHED_DOMAIN_DEBUG back on - had this been enabled
we'd have noticed this bug much earlier.

From: Badari Pulavarty <pbadari@us.ibm.com>

  arch/x86_64/mm/numa.c: In function `numa_setup':
  arch/x86_64/mm/numa.c:332: error: `numa_fake' undeclared (first use in this function)
  arch/x86_64/mm/numa.c:332: error: (Each undeclared identifier is reported only once
  arch/x86_64/mm/numa.c:332: error: for each function it appears in.)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/x86_64/mm/numa.c
kernel/sched.c