Skip to contentSkip to conversation

gve: Fix GFP flags when allocing pages

PATCH Applied Jeroen de Borst 2 participants 2 messages Sep 13, 2022 – Sep 20, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gve: Fix GFP flags when allocing pages

From: Shailend Chand <[email protected]>

Use GFP_ATOMIC when allocating pages out of the hotpath, continue to use GFP_KERNEL when allocating pages during setup.

GFP_KERNEL will allow blocking which allows it to succeed more often in a low memory enviornment but in the hotpath we do not want to allow the allocation to block.

Fixes 9b8dd5e5ea48b ("gve: DQO: Add RX path")
---
 drivers/net/ethernet/google/gve/gve_rx_dqo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/google/gve/gve_rx_dqo.c +1 -1
index 8c939628e2d8..2e6461b0ea8b 100644
@@ -157,7 +157,7 @@ static int gve_alloc_page_dqo(struct gve_priv *priv,
 	int err;
 
 	err = gve_alloc_page(priv, &priv->pdev->dev, &buf_state->page_info.page,
-			     &buf_state->addr, DMA_FROM_DEVICE, GFP_KERNEL);
+			     &buf_state->addr, DMA_FROM_DEVICE, GFP_ATOMIC);
 	if (err)
 		return err;
 
Signature · 1 line
2.37.2.789.g6183377224-goog
#1 lore raw
This patch was applied to netdev/net.git (master) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <[email protected]>:

Quoted 10 lines · On Mon, 12 Sep 2022 17:09:01 -0700 you wrote:

From: Shailend Chand <[email protected]>

Use GFP_ATOMIC when allocating pages out of the hotpath, continue to use GFP_KERNEL when allocating pages during setup.

GFP_KERNEL will allow blocking which allows it to succeed more often in a low memory enviornment but in the hotpath we do not want to allow the allocation to block.

[...]

Here is the summary with links:
- [net] gve: Fix GFP flags when allocing pages
https://git.kernel.org/netdev/net/c/8ccac4edc8da

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html