Open MPI logo

Hardware Locality Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Hardware Locality Development mailing list

Subject: Re: [hwloc-devel] hwloc with Xen system support - v2
From: Brice Goglin (Brice.Goglin_at_[hidden])
Date: 2014-02-11 07:15:07


Hello,

I just pushed some changes to the new "x86-common" branch in hwloc's git.
You should be able to use it from the Xen component with:

  hwloc_x86_discovery(topology, nbprocs /* total number of PUs */, HWLOC_X86_DISC_FLAG_CPUINFO|HWLOC_X86_DISC_FLAG_CACHES, func, data);

func must be something like:

static int hwloc_x86_xen_cpuid(void *data, unsigned pu,
                            unsigned *eax, unsigned *ebx, unsigned *ecx, unsigned *edx)
{
  /* PU is the physical PU number */
}

data will likely be the Xen handle.

Brice

Le 01/02/2014 11:24, Brice Goglin a écrit :
> Le 29/01/2014 18:47, Andrew Cooper a écrit :
>> This would be nice, although it would involve some more selection on the
>> exclusions. Currently, running Xen excludes all other cpu detection
>> methods as they are more likely than not to be wrong.
>>
>> One solution to this would be to have a "generic" x86 cpuid topology
>> generator which must be parametrised with a structure, at which point
>> both Xen and the fallback x86 methods can supply appropriate function
>> pointers.
>>
>> This would allow Xen to use the generic topology code while still
>> preventing fallback to the x86 topology detection method.
> Right, that'd work better, and the code would be nicer.
> I'll look at this.
>
> Brice
>
> _______________________________________________
> hwloc-devel mailing list
> hwloc-devel_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-devel