On 10/08/2014 02:57 PM, Tadeusz Struk wrote:
On 10/08/2014 11:35 AM, Prarit Bhargava wrote:
quoted
quoted
But then how do I know which node I'm physically connected to?
The pci_dev maps to the bus which maps to a numa node. The pci_dev's numa value
is copied directly from the bus (or busses depending on how deep it is).
I'd argue (strongly) that the pci_dev's numa ID better be correct o/w that is a
FW bug (and a bad one at that these days).
dev_to_node() should return the correct value.
I'm not saying that the dev_to_node() returns incorrect value. It will
always return the closest numa node for the given device.
No that isn't correct. dev_to_node() will return the node the device is
connected to.
What we want to enforce is that the closest numa node is the node that
the device is physically connected to. In case if the closest numa node
is the remote node we don't want to use this accelerator.
P.