Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 May 2010 16:26:27 -0700 (PDT)
From:      Hubert Tournier <hubert@frbsd.org>
To:        freebsd-smp@freebsd.org
Subject:   Re: Disabling HyperThreading?
Message-ID:  <28467645.post@talk.nabble.com>
In-Reply-To: <p2yab581e311005050841ob19af115gca86fe06278796a@mail.gmail.com>
References:  <28357071.post@talk.nabble.com> <4BD4727F.4060700@googlemail.com> <28359495.post@talk.nabble.com> <4BD563F7.4010203@googlemail.com> <201004260948.12730.jhb@freebsd.org> <p2yab581e311005050841ob19af115gca86fe06278796a@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

Hello,


Jack L.-3 wrote:
> 
> sysctl machdep.hyperthreading_allowed=0 will disable it.
> 

Thank you for this lead.

It gives the following result on my system:
sysctl: unknown oid 'machdep.hyperthreading_allowed'

Searching a little bit, i found 2 references to this OID in the kernel
source code:
/usr/src/sys/amd64/amd64/mp_machdep.c
/usr/src/sys/i386/i386/mp_machdep.c

Maybe it's missing because (as i read in these files):
SCHED_ULE doesn't allow enabling/disabling HT cores at run-time.

I'm not sure i could use the OID in /boot/loader.conf however?

I also see in the source code that the default is to enable HT cores:
static int      hyperthreading_allowed = 1;

So i will test a custom kernel with this disabled.

For reference, here is the CPU i use:
CPU: Intel(R) Xeon(R) CPU           X5650  @ 2.67GHz (2666.65-MHz K8-class
CPU)
  Origin = "GenuineIntel"  Id = 0x206c2  Stepping = 2
Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
 
Features2=0x9ee3fd<SSE3,DTES64,MON,DS_CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,<b17>,DCA,SSE4.1,SSE4.2,POPCNT>
  AMD Features=0x2c100800<SYSCALL,NX,Page1GB,RDTSCP,LM>
  AMD Features2=0x1<LAHF>
  TSC: P-state invariant
FreeBSD/SMP: Multiprocessor System Detected: 24 CPUs
FreeBSD/SMP: 2 package(s) x 6 core(s) x 2 SMT threads

Best regards,

Hubert
-- 
View this message in context: http://old.nabble.com/Disabling-HyperThreading--tp28357071p28467645.html
Sent from the freebsd-smp mailing list archive at Nabble.com.




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