From owner-freebsd-bugs@FreeBSD.ORG Sat Sep 18 08:50:07 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 89E6010656C3 for ; Sat, 18 Sep 2010 08:50:07 +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 5E6398FC15 for ; Sat, 18 Sep 2010 08:50:07 +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 o8I8o7ZJ020474 for ; Sat, 18 Sep 2010 08:50:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o8I8o70H020473; Sat, 18 Sep 2010 08:50:07 GMT (envelope-from gnats) Date: Sat, 18 Sep 2010 08:50:07 GMT Message-Id: <201009180850.o8I8o70H020473@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Andriy Gapon 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: Andriy Gapon List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 08:50:07 -0000 The following reply was made to PR kern/145385; it has been noted by GNATS. From: Andriy Gapon To: bug-followup@freebsd.org, gcooper@freebsd.org, Jeff Roberson Cc: Subject: Re: kern/145385: [cpu] Logical processor cannot be disabled for some SMT-enabled Intel procs Date: Sat, 18 Sep 2010 11:48:39 +0300 Regarding the part of the patch that sets logical_cpus - I don't really understand what logical_cpus represents. It seems that in topo_probe_0x4() it's set to maximum (possible) number of logical CPUs per whole package (for BSP package). In topo_probe_0xb(), as you've spotted, it was not set at all. We already have cpu_logical variable (talk about confusing names) and that represents number of logical CPUs per core. So, I think that logical_cpus should be abolished altogether and cpu_logical should be used in its place. That would be the end of topo_probe_0x4() where hyperthreading_cpus is assigned with fallback value and init_secondary() where it's used to set logical_cpus_mask. P.S. The code also doesn't seem to properly handle a case where boot_cpu_id % logical_cpus != 0 and/or boot_cpu_id % hyperthreading_cpus !=0 Not sure if that ever happens in real systems, though. -- Andriy Gapon