From patchwork Wed Oct 28 15:01:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shradha Shah X-Patchwork-Id: 537402 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 44135141321 for ; Thu, 29 Oct 2015 02:04:51 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754483AbbJ1PEr (ORCPT ); Wed, 28 Oct 2015 11:04:47 -0400 Received: from nbfkord-smmo01.seg.att.com ([209.65.160.76]:1439 "EHLO nbfkord-smmo01.seg.att.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750964AbbJ1PEq (ORCPT ); Wed, 28 Oct 2015 11:04:46 -0400 Received: from unknown [12.187.104.26] (EHLO webmail.solarflare.com) by nbfkord-smmo01.seg.att.com(mxl_mta-7.2.4-5) with ESMTP id e04e0365.2ad24043a940.1436645.00-2480.3740721.nbfkord-smmo01.seg.att.com (envelope-from ); Wed, 28 Oct 2015 15:04:46 +0000 (UTC) X-MXL-Hash: 5630e40e64a4624e-74c073c8df8ec7b3a4180935862be27c4023f964 Received: from unknown [12.187.104.26] (EHLO webmail.solarflare.com) by nbfkord-smmo01.seg.att.com(mxl_mta-7.2.4-5) over TLS secured channel with ESMTP id 253e0365.0.1436006.00-1814.3738846.nbfkord-smmo01.seg.att.com (envelope-from ); Wed, 28 Oct 2015 15:01:39 +0000 (UTC) X-MXL-Hash: 5630e3534dfd668d-62e34ae8b7b40da276c962f1f48104f6a0ad22ea Received: from sshah-desktop.uk.level5networks.com (10.17.20.135) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Wed, 28 Oct 2015 08:01:32 -0700 From: Shradha Shah Subject: [PATCH net-next 1/4] sfc: use __GFP_NOWARN when allocating RX pages from atomic context. To: David Miller References: <5630E2FD.3070609@solarflare.com> CC: , Message-ID: <5630E349.70207@solarflare.com> Date: Wed, 28 Oct 2015 15:01:29 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <5630E2FD.3070609@solarflare.com> X-Originating-IP: [10.17.20.135] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ocex03.SolarFlarecom.com (10.20.40.36) X-AnalysisOut: [v=2.0 cv=Gdqga3rL c=1 sm=1 a=8BlWFWvVlq5taO8ncb8nKg==:17 a] X-AnalysisOut: [=zRKbQ67AAAAA:8 a=3VnyBeAh6Z0A:10 a=5lJygRwiOn0A:10 a=pK7X] X-AnalysisOut: [0mNQAAAA:8 a=iZLvGaqXibgenXfHDLsA:9 a=pILNOxqGKmIA:10] X-Spam: [F=0.2000000000; CM=0.500; S=0.200(2015072901)] X-MAIL-FROM: X-SOURCE-IP: [12.187.104.26] Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Alexandra Kossovsky If we fail to allocate a page when in atomic context this is handled by scheduling a fill in non-atomic context. As such, a warning is not needed. Signed-off-by: Shradha Shah --- drivers/net/ethernet/sfc/rx.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/ethernet/sfc/rx.c b/drivers/net/ethernet/sfc/rx.c index 809ea461..3f0e129 100644 --- a/drivers/net/ethernet/sfc/rx.c +++ b/drivers/net/ethernet/sfc/rx.c @@ -163,8 +163,15 @@ static int efx_init_rx_buffers(struct efx_rx_queue *rx_queue, bool atomic) do { page = efx_reuse_page(rx_queue); if (page == NULL) { + /* GFP_ATOMIC may fail because of various reasons, + * and we re-schedule rx_fill from non-atomic + * context in such a case. So, use __GFP_NO_WARN + * in case of atomic. + */ page = alloc_pages(__GFP_COLD | __GFP_COMP | - (atomic ? GFP_ATOMIC : GFP_KERNEL), + (atomic ? + (GFP_ATOMIC | __GFP_NOWARN) + : GFP_KERNEL), efx->rx_buffer_order); if (unlikely(page == NULL)) return -ENOMEM;