public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* cpuinfo_x86 and apicid
@ 2006-07-06 15:01 Stephane Eranian
  2006-07-06 15:27 ` linux-os (Dick Johnson)
  2006-07-06 16:19 ` Siddha, Suresh B
  0 siblings, 2 replies; 8+ messages in thread
From: Stephane Eranian @ 2006-07-06 15:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: perfmon, Stephane Eranian

Hello,


In the context of the perfmon2 subsystem for processor with HyperThreading,
we need to know on which thread we are currently running. This comes from
the fact that the performance counters are shared between the two threads.

We use the thread id (smt_id) because we split the counters in half
between the two threads such that two threads on the same core can run
with monitoring on.  We are currently computing the smt_id from the
apicid as returned by a CPUID instruction. This is not very efficient.

I looked through the i386 code and could not find a function nor 
structure that would return this smt_id. In the cpuinfo_x86 structure
there is an apicid field that looks good, yet it does not seem to be
initialized nor used.

Is cpuinfo_x86->apicid field obsolete? 
If so, what is replacing it?

Thanks.

-- 
-Stephane

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-07-06 22:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-06 15:01 cpuinfo_x86 and apicid Stephane Eranian
2006-07-06 15:27 ` linux-os (Dick Johnson)
2006-07-06 16:19 ` Siddha, Suresh B
2006-07-06 20:00   ` Stephane Eranian
2006-07-06 21:06     ` Siddha, Suresh B
2006-07-06 22:25       ` Stephane Eranian
2006-07-06 22:37         ` [perfmon] " Stephane Eranian
2006-07-06 22:47           ` Siddha, Suresh B

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox