lkml.org 
[lkml]   [2006]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [perfmon] Re: cpuinfo_x86 and apicid
On Thu, Jul 06, 2006 at 03:37:45PM -0700, Stephane Eranian wrote:
> Suresh,
>
> On Thu, Jul 06, 2006 at 03:25:43PM -0700, Stephane Eranian wrote:
> > >
> > Ah, yes I missed that. It works there two. I had something wrong
> > about how I accessed cpu_data. I am used to the elegant way we
> > do it on IA-64 but on x86_64 you have to index the cpu_data[]
> > array with smp_processor_id(). I was pointing to cpu_data[0]
> > on all processors.
> >
> > For what I need, I can do cpuinfo_x86->apicid & 0x3 to identify
> > which thread is running. I can now remove some more code in perfmon2.
> >
> I meant cpuinfo_x86->apicid & 0x1.

Instead of hard coding, can you get the size of the mask runtime from the
size of cpu_sibling_map[cpu]

And remember, physical/logical hotplug can change this sibling map.

thanks,
suresh
-
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-07 00:57    [W:0.059 / U:0.936 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site