[lkml]   [2003]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: detecting hyperthreading in linux 2.4.19
On Thursday 09 January 2003 01:54 pm, John Bradford wrote:
> > > Is there a way for a userspace program running on linux 2.4.19 to tell
> > > the difference between a single hyperthreaded xeon P4 with HT enabled
> > > and a dual hyperthreaded xeon P4 with HT disabled? The /proc/cpuinfos
> > > for the two cases are indistinguishable.
> >
> > I don't know of any way to do this in userland. The whole point is that
> > the sibling processors are supposed to look like real ones.
> >
> > You _could_ try running two processes simultaneously in tight spin loops
> > for 100 million cycles and comparing the amount of real time consumed.
> > That would be rather unreliable and kludgey though.
> If /proc/interrupts shows a processor is handling interrupts then it
> is definitely a 'real' one. If it isn't handling interrupts, it may
> or may not be a 'real' one. That's another unreliable and kludgey way
> to tell the difference :-).
> John.
> -

Not quite. The "logical" or "sibling" processor has its own local APIC. This
is necessary to send it the Startup IPI and soft IPIs while the system is

However, it is a full function APIC and can receive I/O interrupts. I have
seen this happen many times.

James Cleverdon
IBM xSeries Linux Solutions
{jamesclv(Unix, preferred), cleverdj(Notes)} at us dot ibm dot com

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.066 / U:2.936 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site