From: Stephane Eranian <eranian@hpl.hp.com>
To: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
Cc: linux-kernel@vger.kernel.org, perfmon@napali.hpl.hp.com
Subject: Re: cpuinfo_x86 and apicid
Date: Thu, 6 Jul 2006 13:00:31 -0700 [thread overview]
Message-ID: <20060706200031.GA10685@frankl.hpl.hp.com> (raw)
In-Reply-To: <20060706091930.A13512@unix-os.sc.intel.com>
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
next prev parent reply other threads:[~2006-07-06 20:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060706200031.GA10685@frankl.hpl.hp.com \
--to=eranian@hpl.hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perfmon@napali.hpl.hp.com \
--cc=suresh.b.siddha@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox