Ok, good to know. The working flow is basically: * src/topology.c initializes some stuff * it calls the OS-specific lookup function, something like look_linux() for instance + look_linux() in src/topology-linux.c does most of the job (by reading /sys and /proc files) + for some OS such as freebsd, look_freebsd() will actually call look_x86() to gather cpuid information on x86 machines because the OS doesn't export much hardware info to user-space (I just committed a comment to the topology-x86.c header to make this clear) * in the future, the core will also call a libpci backend to add some PCI devices to the tree * at this point, objects are added to the tree but most links between children/sibling/cousins/parents are not setup yet * we go back to the core, filter some useless objects, setup all links, cpusets and nodesets
Brice Le 01/12/2010 10:38, Wei Lin a écrit : > Thanks for your effort and reply. > > I am not see any wrong output, the confusion is just from the code > reading of “src/topology-x86.c”. > > I will trace hwloc to understand its working flow in more detail. > > Thanks very much. > > Wei Lin > > *发件人:* Brice Goglin [mailto:brice.gog...@inria.fr] > *发送时间:* 2010年12月1日 17:24 > *收件人:* Sun Yi > *抄送:* Wei Lin > *主题:* Fwd: Re: [hwloc-devel] Intel extended topology enumeration in > x2APIC-supported processor > > Sorry, I forgot to CC your colleague Sun Yi. > > Brice > > > -------- Message original -------- > > *Sujet: *** > > > > Re: [hwloc-devel] Intel extended topology enumeration in > x2APIC-supported processor > > *Date : *** > > > > Wed, 01 Dec 2010 10:22:48 +0100 > > *De : *** > > > > Brice Goglin <brice.gog...@inria.fr> <mailto:brice.gog...@inria.fr> > > *Répondre à : *** > > > > Hardware locality development list <hwloc-de...@open-mpi.org> > <mailto:hwloc-de...@open-mpi.org> > > *Pour : *** > > > > Hardware locality development list <hwloc-de...@open-mpi.org> > <mailto:hwloc-de...@open-mpi.org> > > > > Hello Wei Lin, > > The x86 indeed needs regular updates to support latest processors. But > this x86 backend is mostly only useful if you're using an operating > system that does not export topology information. If you're using > Linux, a recent kernel should already tell hwloc everything you need, > and the x86 backend will not be used at all. Do you actually see some > wrong lstopo output on such machines? FWIW, we use hwloc on many > Westmere-EP and Nehalem-EX machines without problem, and we know SGI > has been using it on large UV machines too. > > Best regards, > Brice > > > > Le 01/12/2010 10:07, Wei Lin a écrit : > > Hi, hwloc-devel > > I cannot find the code branch from “src/topology-x86.c “which can > support for 32-bit APIC ID and CPUID leaf 0xb of Intel’s new processors. > > So I think current hwLoc cannot support for latest Intel CPU with > *x2APIC*. > > Linux kernel 2.6.30 or following version already supports this > hardware feature > > and uses CPUID leaf 0xb to recognize the topology for more than 1024 > logical processors in SGI’s super computer. > > I think hwloc could also support this. > > The following docs from Intel give details about x2APIC: > > http://www.intel.com/Assets/PDF/appnote/241618.pdf > > http://www.intel.com/Assets/pdf/manual/318148.pdf > > or <<Intel? 64 Architecture Processor Topology Enumeration>> > > Thanks > > Wei Lin > > 2010-12-1 > > > _______________________________________________ > hwloc-devel mailing list > hwloc-de...@open-mpi.org <mailto:hwloc-de...@open-mpi.org> > http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-devel > >