nvme: take node locality into account when selecting a path

Make current_path an array with an entry for every possible node, and
cache the best path on a per-node basis.  Take the node distance into
account when selecting it.  This is primarily useful for dual-ported PCIe
devices which are connected to PCIe root ports on different sockets.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
This commit is contained in:
Christoph Hellwig 2018-09-11 09:51:29 +02:00
commit f333444708
3 changed files with 54 additions and 28 deletions