summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShailend Chand <shailend@google.com>2022-09-13 03:09:01 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-09-28 12:32:16 +0300
commit6201c365a0ef0e36053adc6cbadb9f396325f2c2 (patch)
tree3770f7a0eb88b196226d451f12d444512a611c8b
parente969486525bea38de46383b88c2b1653398cc977 (diff)
downloadlinux-6201c365a0ef0e36053adc6cbadb9f396325f2c2.tar.xz
gve: Fix GFP flags when allocing pages
[ Upstream commit 8ccac4edc8da764389d4fc18b1df740892006557 ] 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") Signed-off-by: Shailend Chand <shailend@google.com> Signed-off-by: Jeroen de Borst <jeroendb@google.com> Link: https://lore.kernel.org/r/20220913000901.959546-1-jeroendb@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/net/ethernet/google/gve/gve_rx_dqo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/google/gve/gve_rx_dqo.c b/drivers/net/ethernet/google/gve/gve_rx_dqo.c
index 8c939628e2d8..2e6461b0ea8b 100644
--- a/drivers/net/ethernet/google/gve/gve_rx_dqo.c
+++ b/drivers/net/ethernet/google/gve/gve_rx_dqo.c
@@ -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;