linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2] driver core: Use unbound workqueue for deferred probes
@ 2021-03-24 11:01 Yogesh Lal
  2021-05-26 19:03 ` patchwork-bot+linux-arm-msm
  0 siblings, 1 reply; 2+ messages in thread
From: Yogesh Lal @ 2021-03-24 11:01 UTC (permalink / raw)
  To: gregkh, rafael; +Cc: linux-kernel, linux-arm-msm, Yogesh Lal

Deferred probe usually runs only on pinned kworkers, which might take
longer time if a device contains multiple sub-devices. One such case
is of sound card on mobile devices, where we have good number of
mixers and controls per mixer.

We observed boot up improvement - deferred probes take ~600ms when bound
to little core kworker and ~200ms when deferred probe is queued on
unbound wq. This is due to scheduler moving the worker running deferred
probe work to big CPUs. Without this change, we see the worker is running
on LITTLE CPU due to affinity.

Since kworker runs deferred probe of several devices, the locality may
not be important. Also, init thread executing driver initcalls, can
potentially migrate as it has cpu affinity set to all cpus.In addition
to this, async probes use unbounded workqueue. So, using unbounded wq for
deferred probes looks to be similar to these w.r.t. scheduling behavior.

Signed-off-by: Yogesh Lal <ylal@codeaurora.org>
---
Changes in v2:
Updating the Changelog with issue description.

 drivers/base/dd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index 9179825f..c9c174a 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -182,7 +182,7 @@ static void driver_deferred_probe_trigger(void)
 	 * Kick the re-probe thread.  It may already be scheduled, but it is
 	 * safe to kick it again.
 	 */
-	schedule_work(&deferred_probe_work);
+	queue_work(system_unbound_wq, &deferred_probe_work);
 }
 
 /**
-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a
member of the Code Aurora Forum, hosted by The Linux Foundation


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH V2] driver core: Use unbound workqueue for deferred probes
  2021-03-24 11:01 [PATCH V2] driver core: Use unbound workqueue for deferred probes Yogesh Lal
@ 2021-05-26 19:03 ` patchwork-bot+linux-arm-msm
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+linux-arm-msm @ 2021-05-26 19:03 UTC (permalink / raw)
  To: Yogesh Lal; +Cc: linux-arm-msm

Hello:

This patch was applied to qcom/linux.git (refs/heads/for-next):

On Wed, 24 Mar 2021 16:31:38 +0530 you wrote:
> Deferred probe usually runs only on pinned kworkers, which might take
> longer time if a device contains multiple sub-devices. One such case
> is of sound card on mobile devices, where we have good number of
> mixers and controls per mixer.
> 
> We observed boot up improvement - deferred probes take ~600ms when bound
> to little core kworker and ~200ms when deferred probe is queued on
> unbound wq. This is due to scheduler moving the worker running deferred
> probe work to big CPUs. Without this change, we see the worker is running
> on LITTLE CPU due to affinity.
> 
> [...]

Here is the summary with links:
  - [V2] driver core: Use unbound workqueue for deferred probes
    https://git.kernel.org/qcom/c/e611f8cd8717

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-26 19:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-24 11:01 [PATCH V2] driver core: Use unbound workqueue for deferred probes Yogesh Lal
2021-05-26 19:03 ` patchwork-bot+linux-arm-msm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).