From: Or Gerlitz <ogerlitz@mellanox.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, Matan Barak <matanb@mellanox.com>,
Amir Vadai <amirv@mellanox.com>,
Saeed Mahameed <saeedm@mellanox.com>,
Shani Michaeli <shanim@mellanox.com>,
Ido Shamay <idos@mellanox.com>
Subject: [PATCH V1 net-next 4/5] net/mlx4_en: Add __GFP_COLD gfp flags in alloc_pages
Date: Sun, 2 Nov 2014 16:26:16 +0200 [thread overview]
Message-ID: <1414938377-421-5-git-send-email-ogerlitz@mellanox.com> (raw)
In-Reply-To: <1414938377-421-1-git-send-email-ogerlitz@mellanox.com>
From: Ido Shamay <idos@mellanox.com>
Needed in order to get cache cold pages (L3 flushed) for HW scatter.
Otherwise memory may flush those entries when the packet comes from
PCI, causing back pressure resulting in BW decrease.
Signed-off-by: Ido Shamay <idos@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx4/en_rx.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
index 4cb716f..317abc9 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
@@ -156,7 +156,7 @@ static int mlx4_en_init_allocator(struct mlx4_en_priv *priv,
const struct mlx4_en_frag_info *frag_info = &priv->frag_info[i];
if (mlx4_alloc_pages(priv, &ring->page_alloc[i],
- frag_info, GFP_KERNEL))
+ frag_info, GFP_KERNEL | __GFP_COLD))
goto out;
}
return 0;
@@ -268,7 +268,7 @@ static int mlx4_en_fill_rx_buffers(struct mlx4_en_priv *priv)
if (mlx4_en_prepare_rx_desc(priv, ring,
ring->actual_size,
- GFP_KERNEL)) {
+ GFP_KERNEL | __GFP_COLD)) {
if (ring->actual_size < MLX4_EN_MIN_RX_SIZE) {
en_err(priv, "Failed to allocate enough rx buffers\n");
return -ENOMEM;
@@ -635,7 +635,8 @@ static void mlx4_en_refill_rx_buffers(struct mlx4_en_priv *priv,
int index = ring->prod & ring->size_mask;
while ((u32) (ring->prod - ring->cons) < ring->actual_size) {
- if (mlx4_en_prepare_rx_desc(priv, ring, index, GFP_ATOMIC))
+ if (mlx4_en_prepare_rx_desc(priv, ring, index,
+ GFP_ATOMIC | __GFP_COLD))
break;
ring->prod++;
index = ring->prod & ring->size_mask;
--
1.7.1
next prev parent reply other threads:[~2014-11-02 14:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-02 14:26 [PATCH V1 net-next 0/5] Mellanox ethernet driver update Oct-30-2014 Or Gerlitz
2014-11-02 14:26 ` [PATCH V1 net-next 1/5] net/mlx4_core: Prevent VF from changing port configuration Or Gerlitz
2014-11-02 14:26 ` [PATCH V1 net-next 2/5] net/mlx4_core: Protect port type setting by mutex Or Gerlitz
2014-11-02 14:26 ` [PATCH V1 net-next 3/5] net/mlx4_en: Remove RX buffers alignment to IP_ALIGN Or Gerlitz
2014-11-02 14:26 ` Or Gerlitz [this message]
2014-11-02 14:26 ` [PATCH V1 net-next 5/5] net/mlx4_core: Add retrieval of CONFIG_DEV parameters Or Gerlitz
2014-11-04 16:48 ` Eric Dumazet
2014-11-05 9:19 ` Or Gerlitz
2014-11-03 17:28 ` [PATCH V1 net-next 0/5] Mellanox ethernet driver update Oct-30-2014 David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1414938377-421-5-git-send-email-ogerlitz@mellanox.com \
--to=ogerlitz@mellanox.com \
--cc=amirv@mellanox.com \
--cc=davem@davemloft.net \
--cc=idos@mellanox.com \
--cc=matanb@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=saeedm@mellanox.com \
--cc=shanim@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox