On 10/08/2014 12:01 PM, Prarit Bhargava wrote:
> No that isn't correct.  dev_to_node() will return the node the device is
> connected to.

include/linux/device.h:

static inline int dev_to_node(struct device *dev)
{
  return dev->numa_node;
}

struct device {
.....
  int numa_node; /* NUMA node this device is close to */
...
};

In case when there are two nodes and only node 0 has memory,
dev->numa_node will be 0 even though the device will be connected to the
pci root port of node 1.
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to