Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Fri, 10 Jan 2003 03:08:04 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Fri, 10 Jan 2003 03:08:04 -0500 Received: from petasus.ch.intel.com ([143.182.124.5]:13486 "EHLO petasus.ch.intel.com") by vger.kernel.org with ESMTP id convert rfc822-to-8bit; Fri, 10 Jan 2003 03:08:02 -0500 content-class: urn:content-classes:message Subject: RE: detecting hyperthreading in linux 2.4.19 Date: Fri, 10 Jan 2003 00:16:39 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: detecting hyperthreading in linux 2.4.19 Thread-Index: AcK4d2l7Ug2YIiRpEdewVwBQi2jYqAAB2L6Q X-MimeOLE: Produced By Microsoft Exchange V6.0.6334.0 From: "Pallipadi, Venkatesh" To: "Mikael Pettersson" , Cc: "Jason Lunz" , X-OriginalArrivalTime: 10 Jan 2003 08:16:39.0959 (UTC) FILETIME=[9A0BE270:01C2B880] Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1493 Lines: 35 > -----Original Message----- > From: Mikael Pettersson [mailto:mikpe@csd.uu.se] > > My performance monitoring counters driver uses this approach > in kernel-space > using smp_call_function(). I don't use the siblings tables > because they suck :-) > [I don't think they distinguish between logical CPUs #0 and > #1, and they aren't > exported to modules. The CPUID check is simple and portable > across kernel versions.] I believe it is better to use a OS interface to find out HT, rather than using CPUID. The reason being, it is possible to have HT disabled, in OS, even after processor and the BIOS supports it. 1) Consider the case when processor and BIOS supports HT, but linux was booted with "noht" boot option (now I am not sure whether that option is there in 2.4.19. But is is certainly there in some other kernels). 2) What about some other kernel which is totally ignorant about HT, and doesn't initialize logical processor (kernel which looks at MPS in place of ACPI) I think, in both these cases cpuid can still say HT is present. I know that sibling table is not exported. But I couldn't get your other comment about sibling table "they distinguish between logical CPUs #0 and #1:" Can you elaborate.. Thanks, -Venkatesh - 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/