Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Sep 2010 08:50:07 GMT
From:      Andriy Gapon <avg@freebsd.org>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/145385: [cpu] Logical processor cannot be disabled for some SMT-enabled Intel procs
Message-ID:  <201009180850.o8I8o70H020473@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/145385; it has been noted by GNATS.

From: Andriy Gapon <avg@freebsd.org>
To: bug-followup@freebsd.org, gcooper@freebsd.org,
        Jeff Roberson <jroberson@jroberson.net>
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



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