From patchwork Thu Apr 2 14:07:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Cohen X-Patchwork-Id: 457670 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id D138114007F for ; Fri, 3 Apr 2015 01:07:48 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753479AbbDBOHo (ORCPT ); Thu, 2 Apr 2015 10:07:44 -0400 Received: from mail-wg0-f47.google.com ([74.125.82.47]:33848 "EHLO mail-wg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752093AbbDBOHm (ORCPT ); Thu, 2 Apr 2015 10:07:42 -0400 Received: by wgbdm7 with SMTP id dm7so86706029wgb.1 for ; Thu, 02 Apr 2015 07:07:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=T857ykzmpWdBBPFKQthNpw87bruWEopSWBDLRQ1DOmk=; b=efiIqT452j5GWiWLBnleP4641shg3UozFc2Nxq4SsZMyunErIBigEsoTacbeFgk8Kn SzgYj0IJd09UlJ0zn8XBeMj3aEQWQ2EVsUd/Ntr/GzsfgKR7fVuzaB3+S2r7ZstCa1w0 qGGuam8zkZI0S+tmsZ4MBASeA7kue1vOAuWg6ZOob9a3ZRiBWr/4KfDghoVI7B8Dnx9X pOCoTg9YTCXD5hOF7dqvETWA31huKmP3VM5u7rUH6XmSxz+vqdmvSGYTlKPzLdwb+Npd mZtHrHZ9hE4rdVm5NKwm5lvBnUczkKmeoKwDOFUY4yuAlEt7yqtkogui2sM19l6Q4D68 BRKA== X-Gm-Message-State: ALoCoQnGQo3Gd/SjsWPdJDLpKYQDDtGALRP6FcHnXCPprfUfcUUfW6rxbHWbf41NvcdA5PaI0fDu X-Received: by 10.180.7.196 with SMTP id l4mr24522365wia.44.1427983661439; Thu, 02 Apr 2015 07:07:41 -0700 (PDT) Received: from localhost ([193.47.165.251]) by mx.google.com with ESMTPSA id ka1sm7433070wjc.2.2015.04.02.07.07.40 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 02 Apr 2015 07:07:40 -0700 (PDT) From: Eli Cohen X-Google-Original-From: Eli Cohen To: davem@davemloft.net Cc: netdev@vger.kernel.org, idos@mellaox.com, amirv@mellanox.com, Eli Cohen Subject: [PATCH net-next 01/16] net/mlx5_core: Allocate firmware pages from device's NUMA node Date: Thu, 2 Apr 2015 17:07:19 +0300 Message-Id: <1427983654-971-2-git-send-email-eli@mellanox.com> X-Mailer: git-send-email 2.3.1 In-Reply-To: <1427983654-971-1-git-send-email-eli@mellanox.com> References: <1427983654-971-1-git-send-email-eli@mellanox.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Allocate firmware pages from the NUMA node which is close to the device. Signed-off-by: Eli Cohen --- 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;