How do I turn off hyperthreading on 6.0 ?

Brooks Davis brooks at one-eyed-alien.net
Fri Jan 27 11:32:02 PST 2006


On Fri, Jan 27, 2006 at 07:24:06PM +0000, Pete French wrote:
> > Disable it in the BIOS.  The kernel can't use what isn't advertised as 
> > available.  :)
> 
> true - but surely this is a bug in FreeBSD ?
> 
> man smp says:
> 
> "Since using logical CPUs can cause performance penalties under certain
> loads, the logical CPUs can be disabled by setting the
> machdep.hlt_logical_cpus sysctl to one."
> 
> I have:
> 
> websvr04# sysctl machdep.hlt_logical_cpus
> machdep.hlt_logical_cpus: 1
> 
> but I am still seeing 4 CPU's as I have two physical processors, each with
> two logical ones onboard.
> 
> I find it very hard to believe theres a bug in something this basic though,
> as it's specificly mentioned in the relase notes as being there to disable
> hyperthreading...

You misunderstand the point of this sysctl.  All
machdep.hlt_logical_cpus does is prevent anything from scheduling
anything on the extra logical CPUs.  Since nothing is scheduled on
them, they don't contend with each other and the performance issues are
mitigated.  They are still there and there's nothing the OS can do about
that.

-- Brooks

-- 
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20060127/711dd597/attachment.bin


More information about the freebsd-stable mailing list