From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 85FC8C0650F for ; Thu, 8 Aug 2019 05:23:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 60C06217D7 for ; Thu, 8 Aug 2019 05:23:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730907AbfHHFXs (ORCPT ); Thu, 8 Aug 2019 01:23:48 -0400 Received: from mga01.intel.com ([192.55.52.88]:61961 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725806AbfHHFXr (ORCPT ); Thu, 8 Aug 2019 01:23:47 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Aug 2019 22:23:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,360,1559545200"; d="scan'208";a="374729200" Received: from jbrandeb-mobl2.amr.corp.intel.com (HELO localhost) ([10.254.39.134]) by fmsmga006.fm.intel.com with ESMTP; 07 Aug 2019 22:23:47 -0700 Date: Wed, 7 Aug 2019 22:23:46 -0700 From: Jesse Brandeburg To: Christophe JAILLET Cc: , , , , , , , , jesse.brandeburg@intel.com Subject: Re: [PATCH] net: ethernet: et131x: Use GFP_KERNEL instead of GFP_ATOMIC when allocating tx_ring->tcb_ring Message-ID: <20190807222346.00002ba7@intel.com> In-Reply-To: <20190731073842.16948-1-christophe.jaillet@wanadoo.fr> References: <20190731073842.16948-1-christophe.jaillet@wanadoo.fr> X-Mailer: Claws Mail 3.12.0 (GTK+ 2.24.28; i686-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 31 Jul 2019 09:38:42 +0200 Christophe JAILLET wrote: > There is no good reason to use GFP_ATOMIC here. Other memory allocations > are performed with GFP_KERNEL (see other 'dma_alloc_coherent()' below and > 'kzalloc()' in 'et131x_rx_dma_memory_alloc()') > > Use GFP_KERNEL which should be enough. > > Signed-off-by: Christophe JAILLET Sure, but generally I'd say GFP_ATOMIC is ok if you're in an init path and you can afford to have the allocation thread sleep while memory is being found by the kernel. Reviewed-by: Jesse Brandeburg