Received: by 10.213.65.68 with SMTP id h4csp3964981imn; Tue, 10 Apr 2018 07:17:25 -0700 (PDT) X-Google-Smtp-Source: AIpwx48R64nmdKJvzDe9PAPbslIvE9k0HOzjvzR8UImok3xtgfn2NyLsEu6502PKbXhVe19wRidq X-Received: by 10.101.74.193 with SMTP id c1mr471153pgu.116.1523369845459; Tue, 10 Apr 2018 07:17:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523369845; cv=none; d=google.com; s=arc-20160816; b=MJxBf9C5tBIDokrvkCT4Z59kEjdRxsASUEuKyN2g+CtOwT13XDZVCgYIfqyJBtPRoc +xP8bL9vMxFJ2olca7aChePDYASfqXwrFvY4CvIPi2/BwKxtN/gB2G1r0UKsBanixeew 9G8enu/0lX0sKwZlXyR/uRXSUQXCyxxc9TxfH6FE76ZHgKNpwh2FXG+ptQSPl+o8C0jl FMaez4mjqXdNH9w9ylqM54fO0vpQb7XdMC9WarnDBDOs4TBaYfAvhZdLySNIPxyixuFA 9O246//qRsReujYHCwp3sdd1qhysw3NtCMs1PewgLSXSho3IKmZajwZ3YX+PjIyvtvBH SEqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=R5YYOBdMPftUV1smAIehrN3V9Q0NS/m9CkVNeeNX50U=; b=SQlyyX65Qi2hryNHrZ2IYSsqh145k9wsHlKHhFjagmvGyzKlzdlNtsc0w9H+R1l+YV g/YtZqI3UIpgxkCui4r1WgNKWqBguz3bAninn1x8Y0EM+Dh1zJDqK/NeA1fOWaDcLGn3 x3iInko21mJ4cS/BWP7IRN6ItbE0eKE98j63Q05HHwEfr09glTZgnrx3dyvSImniIzA6 Qva7ieeTdnGHkD8GYBq1kS/OmucnmrsFHNNjqoBUtHqpl5qhEqCWoqgeWRcHtsHBhKGQ Ph8Bim/8z74dKabc400hbq9kts1yB5TS2yCEDwc+cZasrQEha7f7xQRWlut7H5AAQkJQ Qslw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y7-v6si2806286pln.425.2018.04.10.07.16.48; Tue, 10 Apr 2018 07:17:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753945AbeDJONA (ORCPT + 99 others); Tue, 10 Apr 2018 10:13:00 -0400 Received: from mga12.intel.com ([192.55.52.136]:29038 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753089AbeDJOM7 (ORCPT ); Tue, 10 Apr 2018 10:12:59 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Apr 2018 07:12:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,432,1517904000"; d="scan'208";a="31599145" Received: from vkoul-udesk7.iind.intel.com (HELO localhost) ([10.223.84.143]) by fmsmga008.fm.intel.com with ESMTP; 10 Apr 2018 07:12:53 -0700 Date: Tue, 10 Apr 2018 19:47:22 +0530 From: Vinod Koul To: Takashi Iwai Cc: Pierre-Louis Bossart , Adam.Thomson.Opensource@diasemi.com, Jia-Ju Bai , lgirdwood@gmail.com, sathyanarayana.nujella@intel.com, broonie@kernel.org, perex@perex.cz, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: Re: [alsa-devel] [PATCH] sound: soc: intel: bxt_da7219_max98357a: Replace GFP_ATOMIC with GFP_KERNEL in broxton_audio_probe Message-ID: <20180410141721.GQ6014@localhost> References: <1523270781-22627-1-git-send-email-baijiaju1990@gmail.com> <482591fb-bf12-2e0a-e0ef-2ae0b4095000@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 09, 2018 at 09:39:06PM +0200, Takashi Iwai wrote: > On Mon, 09 Apr 2018 20:57:43 +0200, > Pierre-Louis Bossart wrote: > > > > On 4/9/18 5:46 AM, Jia-Ju Bai wrote: > > > broxton_audio_probe() is never called in atomic context. > > > This function is only set as ".probe" in "struct platform_driver". > > > > > > Despite never getting called from atomic context, > > > broxton_audio_probe() calls devm_kzalloc() with GFP_ATOMIC, > > > which waits busily for allocation. > > > GFP_ATOMIC is not necessary and can be replaced with GFP_KERNEL, > > > to avoid busy waiting and improve the possibility of sucessful allocation. > > > > [answering for the series] > > Humm, this is interesting. > > If indeed we can afford to sleep then the change should be done on ALL > > 14 boards in sound/soc/intel/boards which follow the same code > > pattern. > > If we cannot sleep then then none of these changes should be applied. > > Liam and Vinod? > > It must be sleepable context as it's a standard platform driver probe > callback. > > And now looking at grep output, only sound/soc/intel contains so many > calls with GFP_ATOMIC. I bet that almost all can be done with > GFP_KERNEL, maybe only one or two in atom/sst would be conditionally > with GFP_ATOMIC. Yeah I don't see many cases which would warrant atomic context, I will review them and fix these after merge window closes. Clearly machines have no reason for that, and I guess most are copy-paste from 1st culprit -- ~Vinod