* Is there an equivalent to logical_proc_id[] ?
@ 2005-06-20 19:08 Santos, Jose Renato G
2005-06-20 19:28 ` Ryan Harper
0 siblings, 1 reply; 3+ messages in thread
From: Santos, Jose Renato G @ 2005-06-20 19:08 UTC (permalink / raw)
To: xen-devel; +Cc: Turner, Yoshio, Aravind Menon, G John Janakiraman
Hi,
I am trying to port xenoprof to the latest version of xen-unstable
and noticed the variable "logical_proc_id[]" that used to be defined
in setup.c is gone. I spent sometime trying to find an equivalent
variable/function without success.
Does anyone know a simple way of determining the logical CPU id in
a given physical CPU (i.e an id in the range [0,smp_num_siblings-1])?
Thanks in advance for any help
Renato
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Is there an equivalent to logical_proc_id[] ?
2005-06-20 19:08 Is there an equivalent to logical_proc_id[] ? Santos, Jose Renato G
@ 2005-06-20 19:28 ` Ryan Harper
0 siblings, 0 replies; 3+ messages in thread
From: Ryan Harper @ 2005-06-20 19:28 UTC (permalink / raw)
To: Santos, Jose Renato G
Cc: Turner, Yoshio, Aravind Menon, xen-devel, G John Janakiraman
* Santos, Jose Renato G <joserenato.santos@hp.com> [2005-06-20 14:10]:
>
> Hi,
>
> I am trying to port xenoprof to the latest version of xen-unstable
> and noticed the variable "logical_proc_id[]" that used to be defined
> in setup.c is gone. I spent sometime trying to find an equivalent
> variable/function without success.
>
> Does anyone know a simple way of determining the logical CPU id in
> a given physical CPU (i.e an id in the range [0,smp_num_siblings-1])?
>
> Thanks in advance for any help
>
> Renato
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
I used the cpuid_apic id which I found in arch/i386/kernel/cpu/common.c
in the detech_ht() routine.
unsigned int logical_proc_id;
u32 eax, ebx, ecx, edx;
cpuid(1, &eax, &ebx, &ecx, &edx);
logical_proc_id = (ebx >> 24 & 0xff) & 1;
That worked for me when I was trying to get xenoprof to build/work
against unstable tree.
--
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
(512) 838-9253 T/L: 678-9253
ryanh@us.ibm.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: Is there an equivalent to logical_proc_id[] ?
@ 2005-06-20 20:12 Santos, Jose Renato G
0 siblings, 0 replies; 3+ messages in thread
From: Santos, Jose Renato G @ 2005-06-20 20:12 UTC (permalink / raw)
To: Ryan Harper; +Cc: Turner, Yoshio, Aravind Menon, xen-devel, G John Janakiraman
> -----Original Message-----
> From: Ryan Harper [mailto:ryanh@us.ibm.com]
> Sent: Monday, June 20, 2005 12:28 PM
> To: Santos, Jose Renato G
> Cc: xen-devel@lists.xensource.com; Turner, Yoshio; Aravind
> Menon; G John Janakiraman
> Subject: Re: [Xen-devel] Is there an equivalent to logical_proc_id[] ?
>
>
> * Santos, Jose Renato G <joserenato.santos@hp.com> [2005-06-20 14:10]:
> >
> > Hi,
> >
> > I am trying to port xenoprof to the latest version of xen-unstable
> > and noticed the variable "logical_proc_id[]" that used to
> be defined
> > in setup.c is gone. I spent sometime trying to find an equivalent
> > variable/function without success.
> >
> > Does anyone know a simple way of determining the logical CPU id in
> > a given physical CPU (i.e an id in the range
> > [0,smp_num_siblings-1])?
> >
> > Thanks in advance for any help
> >
> > Renato
> >
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
>
> I used the cpuid_apic id which I found in
> arch/i386/kernel/cpu/common.c in the detech_ht() routine.
>
> unsigned int logical_proc_id;
> u32 eax, ebx, ecx, edx;
>
> cpuid(1, &eax, &ebx, &ecx, &edx);
> logical_proc_id = (ebx >> 24 & 0xff) & 1;
>
>
> That worked for me when I was trying to get xenoprof to
> build/work against unstable tree.
>
>
Thanks Ryan
I think you mean the code in xen/arch/x86/cpu/common.c.
I think this would work when smp_num_siblings = 2. (i.e.
Logical_proc_id is 0 or 1).
Looking at the new code, it
looks like xen now support more than 2 logical CPUs per
physical CPU. I am not sure if there is hardware available
with more than 2 logical CPUs, but it seems we will need
to support more than 2 HT per physical CPU in xenoprof, too.
I was wondering if there is some macro that could be used
to determine the logical CPU id in the more general case
in which smp_num_siblings > 2?
Anyway, thanks for the hint...
Renato
> --
> Ryan Harper
> Software Engineer; Linux Technology Center
> IBM Corp., Austin, Tx
> (512) 838-9253 T/L: 678-9253
> ryanh@us.ibm.com
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-06-20 20:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-20 19:08 Is there an equivalent to logical_proc_id[] ? Santos, Jose Renato G
2005-06-20 19:28 ` Ryan Harper
-- strict thread matches above, loose matches on Subject: below --
2005-06-20 20:12 Santos, Jose Renato G
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.