Re: [RFC PATCH] ASoC: core: Optimise suspend/resume of DAPM widgets

2018-08-16 Thread Jon Hunter
On 16/08/18 11:51, Mark Brown wrote: > On Wed, Aug 15, 2018 at 07:48:47PM +0100, Jon Hunter wrote: > >> So then I made the following change to avoid scheduling the function >> calls unnecessarily (which I think should be fine) ... > >> Please note that I am just using ktime_get() to log the tim

Re: [RFC PATCH] ASoC: core: Optimise suspend/resume of DAPM widgets

2018-08-16 Thread Mark Brown
On Wed, Aug 15, 2018 at 07:48:47PM +0100, Jon Hunter wrote: > So then I made the following change to avoid scheduling the function > calls unnecessarily (which I think should be fine) ... > Please note that I am just using ktime_get() to log the time on entry > and exit from dapm_power_widgets()

Re: [RFC PATCH] ASoC: core: Optimise suspend/resume of DAPM widgets

2018-08-15 Thread Jon Hunter
On 14/08/18 15:40, Mark Brown wrote: > On Mon, Aug 13, 2018 at 07:19:16PM +0100, Jon Hunter wrote: >> >> I had taken some ftrace graphs but there was not one thing that really >> stood out. Looking again it seems that each call to >> async_schedule_domain() can take tens of uS and so it there are

Re: [RFC PATCH] ASoC: core: Optimise suspend/resume of DAPM widgets

2018-08-14 Thread Mark Brown
On Mon, Aug 13, 2018 at 07:19:16PM +0100, Jon Hunter wrote: > > I had taken some ftrace graphs but there was not one thing that really > stood out. Looking again it seems that each call to > async_schedule_domain() can take tens of uS and so it there are a lot of > DAPM widgets (100+) this can tak

Re: [RFC PATCH] ASoC: core: Optimise suspend/resume of DAPM widgets

2018-08-13 Thread Jon Hunter
On 03/08/18 17:36, Mark Brown wrote: > On Fri, Aug 03, 2018 at 01:57:05PM +0100, Jon Hunter wrote: > >> For soundcards that have several DAI links and many DAPM widgets the >> time taken for snd_soc_suspend to execute has been observed to be >> several milliseconds. The time is largely spent exe

Re: [RFC PATCH] ASoC: core: Optimise suspend/resume of DAPM widgets

2018-08-03 Thread Mark Brown
On Fri, Aug 03, 2018 at 01:57:05PM +0100, Jon Hunter wrote: > For soundcards that have several DAI links and many DAPM widgets the > time taken for snd_soc_suspend to execute has been observed to be > several milliseconds. The time is largely spent executing > dapm_power_widgets() for each for the

[RFC PATCH] ASoC: core: Optimise suspend/resume of DAPM widgets

2018-08-03 Thread Jon Hunter
For soundcards that have several DAI links and many DAPM widgets the time taken for snd_soc_suspend to execute has been observed to be several milliseconds. The time is largely spent executing dapm_power_widgets() for each for the DAI links that need to be suspended. Given that dapm_power_widgets()