In my fairly recent version of the UPDATING file for 4.9-stable it states that I have to use sysctl to modify the value of 'machdep.hlt_logical_cpus' to '0' to get all of my logical CPU's enabled under hyperthreading. Is this change still necessary? sysctl spits that oid out as unknown when I try to look at it. I do have similar oids but nothing that matches that value precisely: machdep.cpu_idle_hlt: 1 machdep.smp_cpus: 2 machdep.hlt_cpus: 0 Basically I have one CPU that is recognized as 2 CPUs by the kernel. I know that works as it appears in my dmesg. I just want to know if there is anything else I need to do to make sure both logical CPUs are available for use. -Marius M. Rex System Admin Community Connect Inc. marius@mail.communityconnect.com
HyperThreading was enabled by default as of 4.9-release from /usr/src/UPDATING: 20031028: FreeBSD 4.9-RELEASE. 20031022: Support for HyperThread logical CPUs has now been enabled by default. As a result, the HTT kernel option no longer exists. Instead, the logical CPUs are always started so that they can handle interrupts. However, the extra logical CPUs are prevented from executing user processes by default. To enable the logical CPUs, change the value of the machdep.hlt_logical_cpus from 1 to 0. This value can also be set from the loader as a tunable of the same name. Dan On Mon, Mar 15, 2004 at 03:38:10PM -0500, Marius M. Rex MARIUS wrote:> > In my fairly recent version of the UPDATING file for 4.9-stable it states > that I have to use sysctl to modify the value of 'machdep.hlt_logical_cpus' to > '0' to get all of my logical CPU's enabled under hyperthreading. > > Is this change still necessary? sysctl spits that oid out as unknown > when I try to look at it. I do have similar oids but nothing that matches that > value precisely: > > machdep.cpu_idle_hlt: 1 > machdep.smp_cpus: 2 > machdep.hlt_cpus: 0 > > Basically I have one CPU that is recognized as 2 CPUs by the kernel. I > know that works as it appears in my dmesg. I just want to know if there > is anything else I need to do to make sure both logical CPUs are available > for use. > > > -Marius M. Rex > System Admin > Community Connect Inc. > marius@mail.communityconnect.com > > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"
On Mar 15, 2004, at 3:38 PM, Marius M. Rex MARIUS wrote:> In my fairly recent version of the UPDATING file for 4.9-stable it > states > that I have to use sysctl to modify the value of > 'machdep.hlt_logical_cpus' to > '0' to get all of my logical CPU's enabled under hyperthreading. > > Is this change still necessary? sysctl spits that oid out as unknown > when I try to look at it. I do have similar oids but nothing that > matches that > value precisely:The OID only shows up if your CPU reports the "HTT" feature. Look at /var/run/dmesg.boot and look for the line "Features=" under the CPU information right near the top of the kernel boot messages. One of the features should be "HTT". If you disable hyperthreading in your bios, then it will not be there, and the OID will not be there either. later in the kernel boot messages it should show the APIC configuration/reprogramming and indicate multiple processors are present. I'm not sure if you need to enable multiple CPU support for HTT, since both of my HTT machines have two physical processors in them. I have never tried it on a single cpu box. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-Vivek Khera, Ph.D. Khera Communications, Inc. Internet: khera@kciLink.com Rockville, MD +1-301-869-4449 x806 AIM: vivekkhera Y!: vivek_khera http://www.khera.org/~vivek/
if both cpu's are enabled, you will see a C column in top command. It comes to me between STATE and TIME, Also you can see which process is using which cpu etc. PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU CPU COMMAND Marius M. Rex MARIUS wrote:> In my fairly recent version of the UPDATING file for 4.9-stable it states > that I have to use sysctl to modify the value of 'machdep.hlt_logical_cpus' to > '0' to get all of my logical CPU's enabled under hyperthreading. > > Is this change still necessary? sysctl spits that oid out as unknown > when I try to look at it. I do have similar oids but nothing that matches that > value precisely: > > machdep.cpu_idle_hlt: 1 > machdep.smp_cpus: 2 > machdep.hlt_cpus: 0 > > Basically I have one CPU that is recognized as 2 CPUs by the kernel. I > know that works as it appears in my dmesg. I just want to know if there > is anything else I need to do to make sure both logical CPUs are available > for use. > > > -Marius M. Rex > System Admin > Community Connect Inc. > marius@mail.communityconnect.com > > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"