From owner-freebsd-smp@FreeBSD.ORG Wed May 5 23:26:28 2010 Return-Path: Delivered-To: freebsd-smp@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4A7A21065675 for ; Wed, 5 May 2010 23:26:28 +0000 (UTC) (envelope-from bounces@nabble.com) Received: from kuber.nabble.com (kuber.nabble.com [216.139.236.158]) by mx1.freebsd.org (Postfix) with ESMTP id 24CAF8FC0A for ; Wed, 5 May 2010 23:26:27 +0000 (UTC) Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1O9nz1-0001tO-D3 for freebsd-smp@freebsd.org; Wed, 05 May 2010 16:26:27 -0700 Message-ID: <28467645.post@talk.nabble.com> Date: Wed, 5 May 2010 16:26:27 -0700 (PDT) From: Hubert Tournier To: freebsd-smp@freebsd.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: hubert@frbsd.org References: <28357071.post@talk.nabble.com> <4BD4727F.4060700@googlemail.com> <28359495.post@talk.nabble.com> <4BD563F7.4010203@googlemail.com> <201004260948.12730.jhb@freebsd.org> Subject: Re: Disabling HyperThreading? X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2010 23:26:28 -0000 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 Features2=0x9ee3fd,DCA,SSE4.1,SSE4.2,POPCNT> AMD Features=0x2c100800 AMD Features2=0x1 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.