[lkml]   [2003]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRE: detecting hyperthreading in linux 2.4.19

> -----Original Message-----
> From: Mikael Pettersson []
> 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..

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:32    [W:0.045 / U:0.788 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site