From patchwork Tue Sep 13 00:09:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeroen de Borst X-Patchwork-Id: 12974228 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4DF82C6FA82 for ; Tue, 13 Sep 2022 00:09:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229972AbiIMAJs (ORCPT ); Mon, 12 Sep 2022 20:09:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229702AbiIMAJq (ORCPT ); Mon, 12 Sep 2022 20:09:46 -0400 Received: from mail-pg1-x54a.google.com (mail-pg1-x54a.google.com [IPv6:2607:f8b0:4864:20::54a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7044A188 for ; Mon, 12 Sep 2022 17:09:45 -0700 (PDT) Received: by mail-pg1-x54a.google.com with SMTP id s68-20020a632c47000000b00434e0e75076so4731241pgs.7 for ; Mon, 12 Sep 2022 17:09:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date; bh=mf6gAa2FUuC/TKAAUA//hrbOcrhI3EIimGrDttSq75s=; b=dq3G6iOyKmOi1nu+z32aUMEoD4tnTN9UyCOkvgcSBuWo4PfZq5yavLzF4PEedzdP6R 2TGjpRwfBIxOQCfGxom29OJZ7AMmEioC24Q4gG15AY5qS2hV0XWprDBX+L3pS8pzhqFU CQyCZdRWraUPaozPeqp5RugfZqK7LvusXkv8buWMgSiwh2i64Z2taaercBBBhTGSe78l lg6ZhEe5mmNSmkVy9rnCHqyioLPyy7viedqREsD0DiYRmFE6H3CFrmPss3CL2iZ2JMnZ PYqJHURGxuy07KBONh2WwMl79qAqvN//rq1cdKHatawePNY55D3FNg7WLvZrWOpPLUxh CxCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date; bh=mf6gAa2FUuC/TKAAUA//hrbOcrhI3EIimGrDttSq75s=; b=rujQ3GPi8hfwLE15s6FsV3W5r1JJe51SxUJ05HpWZurefVOfoZCIXbgdLpK7f774Xv 1ZedsloxMwgLfFBfqa6vwwkX8Mz2zAJi95bO3BmxIwfgSEz+OcSdi3B68ffX9esRrvse vwObRoet5zj7yjBGgKldGa76IsMbm408pF4hgmSLJ+T8YqpuxxgoJI52G3RpLoKJHQc7 /T9MfFyK78wXNFXEIekDPOn065ulp/c5MqREQj2MlMJeh2Z9qjts5Bhz1OTBYG/XY6Ae Nyqvu5+S81G05EzNrW7eL+pwlJcy1qbBsEXyPrmQD4MB2Ts3oHGonSXxa1Tg3yH7l/he BzAA== X-Gm-Message-State: ACgBeo00ieFzjIdQevHWfOSw+8+0VC3v8avu6ixWfMaCsRoM4ZkcwMRv DiQQpns0S18G5puwCavf2+5qzm/W8bW6pzHF8iOIfg0G/Utpoeu1Fx4OYDhb7qP1mfR/qDxDhFv NAz4f5FBzi9Hsc3fMAj8KtFuakh95YhxOKcstEFOaFNKLFZCxwJ/SWvvNewmx7AQHGCQ= X-Google-Smtp-Source: AA6agR4OqTC0e+DLad/HHxyFq3S4H2cNMRv3jLQomEbyo/KrUJJ+G65qjqGrXHST8WElepi0mLKxhguBSrmGWw== X-Received: from jeroendb9128802.sea.corp.google.com ([2620:15c:100:202:9a4d:8a2b:134e:1e68]) (user=jeroendb job=sendgmr) by 2002:a17:90a:1912:b0:1f7:8c6c:4fde with SMTP id 18-20020a17090a191200b001f78c6c4fdemr1035189pjg.8.1663027785151; Mon, 12 Sep 2022 17:09:45 -0700 (PDT) Date: Mon, 12 Sep 2022 17:09:01 -0700 Mime-Version: 1.0 X-Mailer: git-send-email 2.37.2.789.g6183377224-goog Message-ID: <20220913000901.959546-1-jeroendb@google.com> Subject: [PATCH net] gve: Fix GFP flags when allocing pages From: Jeroen de Borst To: netdev@vger.kernel.org Cc: davem@davemloft.net, kuba@kernel.org, Shailend Chand , Jeroen de Borst Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Shailend Chand 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 Signed-off-by: Jeroen de Borst --- drivers/net/ethernet/google/gve/gve_rx_dqo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;