kern/145385: [cpu] Logical processor cannot be disabled for some SMT-enabled Intel procs

Garrett Cooper gcooper at FreeBSD.org
Thu Nov 18 00:40:10 UTC 2010


The following reply was made to PR kern/145385; it has been noted by GNATS.

From: Garrett Cooper <gcooper at FreeBSD.org>
To: Andriy Gapon <avg at freebsd.org>
Cc: bug-followup at freebsd.org
Subject: Re: kern/145385: [cpu] Logical processor cannot be disabled for some
 SMT-enabled Intel procs
Date: Wed, 17 Nov 2010 16:34:29 -0800

 On Thu, Oct 7, 2010 at 10:03 AM, Andriy Gapon <avg at freebsd.org> wrote:
 >
 > Here's a patch to remove halted logical processors from root cpu set (cpu=
 set
 > number zero) and consequently all child sets:
 > http://people.freebsd.org/~avg/cpu-halt.diff
 >
 > Please note that unhalting CPUs will add them to cpuset zero, but will no=
 t
 > (re-)add them cpusets of the running processes. =A0So additional action w=
 ill be
 > required from system administrator if e would like existing processes to =
 make use
 > of unhalted CPUs.
 >
 > Also, interrupts that are bound to halted CPUs are not rebound on halt, a=
 nd so
 > will be delivered to halted CPUs. =A0This should not be a problem for typ=
 ical
 > environments, but would be nice to fix anyway.
 
     Sorry for taking so long to get back on this item. The patch looks
 ok as far as setting the CPUSET is concerned (setting
 machdep.hlt_logical_cpus=3D1 works on an r710 with 8 logical procs as
 SCHED_ULE schedules all of the tasks on the non-logical SMT cores, not
 the logical ones, and the patch properly detects that there aren't any
 logical processors on a Core2 Quad I have at home), but it's missing a
 key case where I go from...
 
 machdep.hlt_logical_cpus: 1 -> 0
 
     ... it should reset CPUSETZERO.
     The overall CPU topology should probably be cached and restored
 when reset, or at least CPUSETZERO should be reset (probably the
 simpler and cleaner route to go).
     After that all that's required is work for i386 and I'd vote for a
 commit of the patch.
 Thanks for the hard work Andriy :)!
 -Garrett


More information about the freebsd-bugs mailing list