Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp3621796pxb; Mon, 21 Feb 2022 02:03:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJyCArtMiCz2DuwHpgmGQJjrAGaSHY0511KodASL1MdpbgQEUwoUzjRGj5rWMy+BY6148ph7 X-Received: by 2002:a63:ee18:0:b0:372:8466:565c with SMTP id e24-20020a63ee18000000b003728466565cmr15379581pgi.564.1645437829662; Mon, 21 Feb 2022 02:03:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645437829; cv=none; d=google.com; s=arc-20160816; b=E2Fb4JukmiWzSPmiYjocav3a+1rRJM6n3otPigHVLOc1GGJbnmUSq6zQYQyXabYdEp CMuEiKCo8lbWFlNCTfXbt28A7AnYYzYyX8XJenKjcMpPBw3wmFis1cx3P55B9g5UeIKL SHoxS2x/61FUAl1UDWabVg1Mc+1oyI8aRtCbrtNrNxN9EH1rxwMD5K3U7w6Cjy3nMxnu w98feBC6Ps0zLdBfbA5FqPnPgrVuHTgUiKnnmKBr04EtgvS4umpGaOnZRYObIEJWec9i QlaoNWMp9WWgH3vhvJKrqR5tY77qTxieQqm2x2SHRwgjgV/HG5Fskey8zznHTczqplhA TNcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:dkim-filter; bh=AYc5desKP026NFMD9V+43L6QSxF65MX/vuiGLcZWA4o=; b=k5htYxZjHnH4ExqDt2FQkW3XPjuspk/mgsg4pps77jYvn8n7wj0Gqw9fgNfIKEcg/m HFI9yuj8j8Wy0aMvcTEvR/23R6xyHEg5V8T5S0dpGO89B4pphGHG8TTlyla7ZNt/jIBK WxvuTasz4IKsz8riIRswqUM6QxeeS9b0crNT3q2JAQHTQ/eR7QdKj6iFdlvaEXuibX0v jB2GDkEmDh8ZATN3QGiXXNo85SPddUuC4RTTpQJl29xqRo+QvYn8tZOvTu0mkGpIrpxl SRu055/jyK4do+I9/qHongwnRZWR5t8E16Ie0JsnuK9XgrQUBQ/wQfusyH5IuwXaqcZS N8jg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e12si3073993pgm.874.2022.02.21.02.03.36; Mon, 21 Feb 2022 02:03:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243727AbiBTKEQ (ORCPT + 99 others); Sun, 20 Feb 2022 05:04:16 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:54112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236236AbiBTKEP (ORCPT ); Sun, 20 Feb 2022 05:04:15 -0500 Received: from mxout01.lancloud.ru (mxout01.lancloud.ru [45.84.86.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6782854692; Sun, 20 Feb 2022 02:03:53 -0800 (PST) Received: from LanCloud DKIM-Filter: OpenDKIM Filter v2.11.0 mxout01.lancloud.ru 81FA120DA92E Received: from LanCloud Received: from LanCloud Received: from LanCloud Subject: Re: [PATCH] ravb: Use GFP_KERNEL instead of GFP_ATOMIC when possible To: Christophe JAILLET , "David S. Miller" , Jakub Kicinski CC: , , , References: <3d67f0369909010d620bd413c41d11b302eb0ff8.1645342015.git.christophe.jaillet@wanadoo.fr> From: Sergey Shtylyov Organization: Open Mobile Platform Message-ID: <8e260e34-58aa-53ba-2ad2-164e6462998b@omp.ru> Date: Sun, 20 Feb 2022 13:03:50 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <3d67f0369909010d620bd413c41d11b302eb0ff8.1645342015.git.christophe.jaillet@wanadoo.fr> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [192.168.11.198] X-ClientProxiedBy: LFEXT01.lancloud.ru (fd00:f066::141) To LFEX1907.lancloud.ru (fd00:f066::207) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello! On 2/20/22 10:27 AM, Christophe JAILLET wrote: > 'max_rx_len' can be up to GBETH_RX_BUFF_MAX (i.e. 8192) (see > 'gbeth_hw_info'). > The default value of 'num_rx_ring' can be BE_RX_RING_SIZE (i.e. 1024). > > So this loop can allocate 8 Mo of memory. MB? :-) > > Previous memory allocations in this function already use GFP_KERNEL, so > use __netdev_alloc_skb() and an explicit GFP_KERNEL instead of a > implicit GFP_ATOMIC. > > This gives more opportunities of successful allocation. > > Signed-off-by: Christophe JAILLET Reviewed-by: Sergey Shtylyov [...] MBR, Sergey