From owner-freebsd-bugs@FreeBSD.ORG Thu Nov 18 00:40:10 2010 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC9931065670 for ; Thu, 18 Nov 2010 00:40:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id CA5D18FC15 for ; Thu, 18 Nov 2010 00:40:10 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id oAI0eA0T091228 for ; Thu, 18 Nov 2010 00:40:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id oAI0eAGN091227; Thu, 18 Nov 2010 00:40:10 GMT (envelope-from gnats) Date: Thu, 18 Nov 2010 00:40:10 GMT Message-Id: <201011180040.oAI0eAGN091227@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Garrett Cooper Cc: Subject: Re: kern/145385: [cpu] Logical processor cannot be disabled for some SMT-enabled Intel procs X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Garrett Cooper List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 00:40:10 -0000 The following reply was made to PR kern/145385; it has been noted by GNATS. From: Garrett Cooper To: Andriy Gapon Cc: bug-followup@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 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