Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Mar 2010 13:08:57 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r204910 - in stable/7/sys: amd64/amd64 i386/i386
Message-ID:  <201003091308.o29D8vF3023176@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Tue Mar  9 13:08:57 2010
New Revision: 204910
URL: http://svn.freebsd.org/changeset/base/204910

Log:
  Don't include disabled CPUs in the topology map.  ULE assumes that all CPUs
  in the topology map were present and enabled.  Booting a system with
  hyperthreading and at least one CPU would cause ULE to attempt to use a
  disabled CPU when rebalancing load resulting in a panic.  This is a direct
  commit to 7 as the topology code is different in 8 and later.

Modified:
  stable/7/sys/amd64/amd64/mp_machdep.c
  stable/7/sys/i386/i386/mp_machdep.c

Modified: stable/7/sys/amd64/amd64/mp_machdep.c
==============================================================================
--- stable/7/sys/amd64/amd64/mp_machdep.c	Tue Mar  9 10:31:03 2010	(r204909)
+++ stable/7/sys/amd64/amd64/mp_machdep.c	Tue Mar  9 13:08:57 2010	(r204910)
@@ -200,7 +200,8 @@ mp_topology(void)
 	group = &mp_groups[0];
 	groups = 1;
 	for (cpu = 0, apic_id = 0; apic_id <= MAX_APIC_ID; apic_id++) {
-		if (!cpu_info[apic_id].cpu_present)
+		if (!cpu_info[apic_id].cpu_present ||
+		    cpu_info[apic_id].cpu_disabled)
 			continue;
 		/*
 		 * If the current group has members and we're not a logical

Modified: stable/7/sys/i386/i386/mp_machdep.c
==============================================================================
--- stable/7/sys/i386/i386/mp_machdep.c	Tue Mar  9 10:31:03 2010	(r204909)
+++ stable/7/sys/i386/i386/mp_machdep.c	Tue Mar  9 13:08:57 2010	(r204910)
@@ -255,7 +255,8 @@ mp_topology(void)
 	group = &mp_groups[0];
 	groups = 1;
 	for (cpu = 0, apic_id = 0; apic_id <= MAX_APIC_ID; apic_id++) {
-		if (!cpu_info[apic_id].cpu_present)
+		if (!cpu_info[apic_id].cpu_present ||
+		    cpu_info[apic_id].cpu_disabled)
 			continue;
 		/*
 		 * If the current group has members and we're not a logical



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003091308.o29D8vF3023176>