[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <s5h3704dvad.wl-tiwai@suse.de>
Date: Mon, 09 Apr 2018 21:39:06 +0200
From: Takashi Iwai <tiwai@...e.de>
To: "Pierre-Louis Bossart" <pierre-louis.bossart@...ux.intel.com>
Cc: <Adam.Thomson.Opensource@...semi.com>,
"Jia-Ju Bai" <baijiaju1990@...il.com>, <lgirdwood@...il.com>,
<sathyanarayana.nujella@...el.com>, <broonie@...nel.org>,
<perex@...ex.cz>, <alsa-devel@...a-project.org>,
"Vinod Koul" <vinod.koul@...el.com>, <linux-kernel@...r.kernel.org>
Subject: Re: [alsa-devel] [PATCH] sound: soc: intel: bxt_da7219_max98357a: Replace GFP_ATOMIC with GFP_KERNEL in broxton_audio_probe
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.
thanks,
Takashi
Powered by blists - more mailing lists