[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1427983654-971-2-git-send-email-eli@mellanox.com>
Date: Thu, 2 Apr 2015 17:07:19 +0300
From: Eli Cohen <eli@....mellanox.co.il>
To: davem@...emloft.net
Cc: netdev@...r.kernel.org, idos@...laox.com, amirv@...lanox.com,
Eli Cohen <eli@...lanox.com>
Subject: [PATCH net-next 01/16] 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@...lanox.com>
---
drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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;
--
2.3.1
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists