lkml.org 
[lkml]   [2006]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: cpuinfo_x86 and apicid
On Thu, Jul 06, 2006 at 09:19:30AM -0700, Siddha, Suresh B wrote:
> On Thu, Jul 06, 2006 at 08:01:18AM -0700, Stephane Eranian wrote:
> > 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?
>
> In i386, it is getting initialized in generic_identify() in common.c and
> it is getting used for example in intel_cacheinfo.c
>
Well, yes this is exactly what I want, except that it is not compiled for x86_64
so on a HT Xeon in 64-bit I don't get it. Why is that?

--

-Stephane
-
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/

\
 
 \ /
  Last update: 2006-07-06 22:11    [W:0.998 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site