Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Fri, 10 Jan 2003 05:59:50 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Fri, 10 Jan 2003 05:59:50 -0500 Received: from noodles.codemonkey.org.uk ([213.152.47.19]:385 "EHLO noodles.internal") by vger.kernel.org with ESMTP id ; Fri, 10 Jan 2003 05:59:45 -0500 Date: Fri, 10 Jan 2003 11:05:47 +0000 From: Dave Jones To: Mikael Pettersson Cc: jamesclv@us.ibm.com, Jason Lunz , linux-kernel@vger.kernel.org Subject: Re: detecting hyperthreading in linux 2.4.19 Message-ID: <20030110110547.GC29190@codemonkey.org.uk> Mail-Followup-To: Dave Jones , Mikael Pettersson , jamesclv@us.ibm.com, Jason Lunz , linux-kernel@vger.kernel.org References: <200301091337.04957.jamesclv@us.ibm.com> <15902.28835.127030.199073@harpo.it.uu.se> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15902.28835.127030.199073@harpo.it.uu.se> User-Agent: Mutt/1.4i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 785 Lines: 20 On Fri, Jan 10, 2003 at 08:05:07AM +0100, Mikael Pettersson wrote: > If the kernel has sched_setaffinity() or some other way of binding a process > to a given CPU (as numbered by the kernel, which may or may not be related > to any physical CPU numbers), then this will do it: execute CPUID on each > CPU and check the initial APIC ID field. If you find one that's non-zero, > then HT is enabled. That's a horrible way of reimplementing /dev/cpu/x/cpuid 8-) Dave -- | Dave Jones. http://www.codemonkey.org.uk | SuSE Labs - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/