diff options
author | Eli Cohen <eli@dev.mellanox.co.il> | 2015-04-02 17:07:19 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-04-02 16:33:40 -0400 |
commit | ad1891062adcdacb5818e104707dca8c193c33d8 (patch) | |
tree | 1dfa4b6d4a77ec23bc27909f5f1fc1bcd151dfa1 | |
parent | c448b5e7853b5921957c4cbf5ad54a20eff79882 (diff) |
net/mlx5_core: Allocate firmware pages from device's NUMA node
Allocate firmware pages from the NUMA node which is close to the device.
Signed-off-by: Eli Cohen <eli@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c b/drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c index 4fdaae9b54d9..cf8591a0c48d 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c @@ -243,8 +243,9 @@ static int alloc_system_page(struct mlx5_core_dev *dev, u16 func_id) struct page *page; u64 addr; int err; + int nid = dev_to_node(&dev->pdev->dev); - page = alloc_page(GFP_HIGHUSER); + page = alloc_pages_node(nid, GFP_HIGHUSER, 0); if (!page) { mlx5_core_warn(dev, "failed to allocate page\n"); return -ENOMEM; |