gve: Fix GFP flags when allocing pages
Subsystems (3)
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.
--- 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
@@ -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
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_ATOMICwhen allocating pages out of the hotpath, continue to useGFP_KERNELwhen allocating pages during setup.
GFP_KERNELwill 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