Hi Brice, Thanks for your reply. I will look into it.
Regards, Pradeep On 9 January 2015 at 10:42, Brice Goglin <brice.gog...@inria.fr> wrote: > Hello > > Assuming the NUMA distance matrix is available, the distance between a CPU > and a PCI device is basically the distance between the NUMA node that > contains this CPU and the NUMA node close to the PCI device. > > In theory, you would have > 1) CPU to local NUMA node = constant > 2) NUMA node to other NUMA node = the significant part when looking at I/O > affinity > 3) other NUMA node to local PCI device = constant when you switch between > CPUs, and pretty-much constant when you switch between PCI devices > > Keep in mind that (2) is a "relative latency", not an actual physical > distance, but it's enough for "comparing distances". > > Brice > > > > Le 09/01/2015 10:30, Pradeep Kiruvale a écrit : > > Hi Brice, > > Thanks for the reply. Is it possible to get the distance matrix for each > cpu and the pci device from these hwloc apis? > > Regards, > Pradeep > > On 8 January 2015 at 18:39, Brice Goglin <brice.gog...@inria.fr> wrote: > >> Hello, >> >> hwloc_topology_init(&topology); >> hwloc_topology_set_flags(topology, HWLOC_TOPOLOGY_FLAG_IO_DEVICES); >> hwloc_topology_load(topology); >> >> Then you can use hwloc_get_next_pcidev() to iterate over the entire list >> PCI devices. If you want to know whether it's connected to a specific NUMA >> node, start from the PCI hwloc_obj_t and walk up the ->parent pointer until >> you find a NUMA node object (not guaranteed, could be connected to >> something else, even something that is not a child of a NUMA node, for >> instance the entire machine object). >> >> Otherwise, you can start at the NUMA node object, walk its children until >> you find some object of type Bridge, then recursively walk children to find >> all PCI objects (it's often organized as a imbalanced tree, there can other >> bridges in the middle). >> >> Brice >> >> >> >> >> Le 08/01/2015 17:19, Pradeep Kiruvale a écrit : >> >> Hi All, >> >> I am looking for a sample application which can provide me the list of >> PCI devices connected >> to each NUMA node. Please let me know how can access the information >> programmatically on >> a Linux system using hwloc APIs. >> >> Regards, >> Pradeep >> >> >> >> >> _______________________________________________ >> hwloc-users mailing listhwloc-us...@open-mpi.org >> Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-users >> Link to this post: >> http://www.open-mpi.org/community/lists/hwloc-users/2015/01/1145.php >> >> >> >> _______________________________________________ >> hwloc-users mailing list >> hwloc-us...@open-mpi.org >> Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-users >> Link to this post: >> http://www.open-mpi.org/community/lists/hwloc-users/2015/01/1147.php >> > > >