From: "Péter Ujfalusi" <peter.ujfalusi@ti.com>
To: Tejun Heo <tj@kernel.org>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
Samuel Ortiz <sameo@linux.intel.com>,
Tony Lindgren <tony@atomide.com>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
"Lopez Cruz, Misael" <misael.lopez@ti.com>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"Girdwood, Liam" <lrg@ti.com>
Subject: Re: [PATCH v4 11/18] input: Add initial support for TWL6040 vibrator
Date: Tue, 14 Jun 2011 13:22:45 +0300 [thread overview]
Message-ID: <100646074.zaKeYdXKr4@barack> (raw)
In-Reply-To: <20110614081836.GG8141@htj.dyndns.org>
On Tuesday 14 June 2011 10:18:36 Tejun Heo wrote:
> I see, so IIUC,
>
> * If it's using mutex and not holding CPU for the whole duration, you
> shouldn't need to do anything special for latency for other work
> items. Workqueue code will start executing other work items as soon
> as the I2C work item goes to sleep.
I see.
> * If I2C work item is burning CPU cycles for the whole duration which
> may stretch to tens / few hundreds millsecs, 1. it's doing something
> quite wrong, 2. should be marked WQ_CPU_INTENSIVE.
>
> So, if something needs to be modified, it's the I2C stuff, not the
> vibrator driver. If I2C stuff isn't doing something wonky, there
> shouldn't be a latency problem to begin with.
In case of OMAP the former is the case regarding to I2C.
However I did run a short experiments regarding to latencies:
With create_singlethread_workqueue :
Jun 14 12:54:30 omap-gentoo kernel: [ 211.269531] vibra scheduling time: 30 usec
Jun 14 12:54:30 omap-gentoo kernel: [ 211.300811] vibra scheduling time: 30 usec
Jun 14 12:54:33 omap-gentoo kernel: [ 214.419006] vibra scheduling time: 31 usec
Jun 14 12:54:34 omap-gentoo kernel: [ 214.980987] vibra scheduling time: 30 usec
Jun 14 12:54:35 omap-gentoo kernel: [ 215.762115] vibra scheduling time: 30 usec
Jun 14 12:54:35 omap-gentoo kernel: [ 215.816650] vibra scheduling time: 30 usec
Jun 14 12:54:35 omap-gentoo kernel: [ 215.871337] vibra scheduling time: 61 usec
Jun 14 12:54:35 omap-gentoo kernel: [ 215.926025] vibra scheduling time: 61 usec
Jun 14 12:54:35 omap-gentoo kernel: [ 215.980743] vibra scheduling time: 61 usec
Jun 14 12:54:35 omap-gentoo kernel: [ 216.035430] vibra scheduling time: 61 usec
Jun 14 12:54:38 omap-gentoo kernel: [ 219.425659] vibra scheduling time: 31 usec
Jun 14 12:54:40 omap-gentoo kernel: [ 220.981658] vibra scheduling time: 31 usec
Jun 14 12:54:44 omap-gentoo kernel: [ 224.692504] vibra scheduling time: 30 usec
Jun 14 12:54:44 omap-gentoo kernel: [ 225.067138] vibra scheduling time: 30 usec
With create_workqueue :
Jun 14 12:05:00 omap-gentoo kernel: [ 304.965393] vibra scheduling time: 183 usec
Jun 14 12:05:01 omap-gentoo kernel: [ 305.964996] vibra scheduling time: 61 usec
Jun 14 12:05:03 omap-gentoo kernel: [ 307.684082] vibra scheduling time: 152 usec
Jun 14 12:05:06 omap-gentoo kernel: [ 310.972778] vibra scheduling time: 30 usec
Jun 14 12:05:08 omap-gentoo kernel: [ 312.683715] vibra scheduling time: 61 usec
Jun 14 12:05:10 omap-gentoo kernel: [ 314.785675] vibra scheduling time: 183 usec
Jun 14 12:05:15 omap-gentoo kernel: [ 319.800903] vibra scheduling time: 61 usec
Jun 14 12:05:16 omap-gentoo kernel: [ 320.738403] vibra scheduling time: 30 usec
Jun 14 12:05:16 omap-gentoo kernel: [ 320.793090] vibra scheduling time: 61 usec
Jun 14 12:05:16 omap-gentoo kernel: [ 320.847778] vibra scheduling time: 61 usec
Jun 14 12:05:16 omap-gentoo kernel: [ 320.902465] vibra scheduling time: 61 usec
Jun 14 12:05:16 omap-gentoo kernel: [ 320.957153] vibra scheduling time: 61 usec
Jun 14 12:05:16 omap-gentoo kernel: [ 320.996185] vibra scheduling time: 31 usec
This is in a system, where I do not have any other drivers on I2C bus, and I have
generated some load with this command:
grep -r generate_load /*
So, I have some CPU, and IO load as well.
At the end the differences are not that big, but with create_singlethread_workqueue
I can see less spikes.
This is with 3.0-rc2 kernel
I still think, that there is a place for the create_singlethread_workqueue, and the
tactile feedback needs such a thing.
As I recall correctly this was the reason to use create_singlethread_workqueue
in the twl4030-vibra driver as well (there were latency issues without it).
--
Péter
next prev parent reply other threads:[~2011-06-14 10:22 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-10 11:54 [PATCH v4 00/18] MFD/ASoC/Input: TWL4030/TWL60X0 changes Peter Ujfalusi
2011-06-10 11:54 ` [PATCH v4 01/18] OMAP: New twl-common for common TWL configuration Peter Ujfalusi
2011-06-10 11:54 ` [PATCH v4 02/18] OMAP4: Move common twl6030 configuration to twl-common Peter Ujfalusi
2011-06-10 11:54 ` [PATCH v4 03/18] OMAP3: Move common twl " Peter Ujfalusi
2011-06-10 11:54 ` [PATCH v4 04/18] OMAP3: Move common regulator " Peter Ujfalusi
2011-06-10 11:54 ` [PATCH v4 05/18] MFD: twl4030-codec: Rename internals from codec to audio Peter Ujfalusi
2011-06-10 11:54 ` [PATCH v4 06/18] MFD: twl4030-codec -> twl4030-audio: Rename the driver Peter Ujfalusi
2011-06-10 11:54 ` [PATCH v4 07/18] MFD: twl4030-audio: Rename platform data Peter Ujfalusi
2011-06-10 11:54 ` [PATCH v4 08/18] mfd: twl6040: Add initial support Peter Ujfalusi
2011-06-10 11:54 ` [PATCH v4 09/18] ASoC: twl6040: Convert into TWL6040 MFD child Peter Ujfalusi
2011-06-10 11:54 ` [PATCH v4 10/18] MFD: twl6040: Change platform data for soc codec driver Peter Ujfalusi
2011-06-10 11:54 ` [PATCH v4 11/18] input: Add initial support for TWL6040 vibrator Peter Ujfalusi
2011-06-11 23:18 ` Dmitry Torokhov
2011-06-13 9:51 ` Péter Ujfalusi
2011-06-13 21:20 ` Dmitry Torokhov
2011-06-14 6:34 ` Tejun Heo
2011-06-14 7:17 ` Péter Ujfalusi
2011-06-14 7:31 ` Re: " Tejun Heo
2011-06-14 7:51 ` Péter Ujfalusi
2011-06-14 8:18 ` Re: Re: " Tejun Heo
2011-06-14 10:22 ` Péter Ujfalusi [this message]
2011-06-15 8:18 ` Tejun Heo
2011-06-15 8:23 ` Tejun Heo
2011-06-16 11:13 ` Péter Ujfalusi
2011-06-16 12:02 ` Re: Re: Re: Re: " Tejun Heo
2011-06-16 14:06 ` Péter Ujfalusi
2011-06-17 9:39 ` Péter Ujfalusi
2011-06-17 9:43 ` Re: [alsa-devel] " Tejun Heo
2011-06-17 10:59 ` Péter Ujfalusi
2011-06-18 14:57 ` Dmitry Torokhov
2011-06-18 15:36 ` Re: Re: [alsa-devel] " Tejun Heo
2011-06-10 11:54 ` [PATCH v4 12/18] OMAP4: SDP4430: Add twl6040 vibrator platform support Peter Ujfalusi
2011-06-10 11:54 ` [PATCH v4 13/18] ASoC: twl6040: add all ABE DAIs Peter Ujfalusi
2011-06-10 11:54 ` [PATCH v4 14/18] ASoC: twl6040: Support other sample rates in constraints Peter Ujfalusi
2011-06-10 11:54 ` [PATCH v4 15/18] ASoC: twl6040: Remove pll and headset mode dependency Peter Ujfalusi
2011-06-10 11:54 ` [PATCH v4 16/18] ASoC: twl6040: set default constraints Peter Ujfalusi
2011-06-10 11:54 ` [PATCH v4 17/18] ASoC: twl6040: Configure ramp step based on platform Peter Ujfalusi
2011-06-10 11:54 ` [PATCH v4 18/18] OMAP4: SDP4430: Add twl6040 codec platform support Peter Ujfalusi
2011-06-17 10:06 ` [PATCH v4 00/18] MFD/ASoC/Input: TWL4030/TWL60X0 changes Péter Ujfalusi
2011-06-17 9:39 ` Mark Brown
2011-06-17 10:53 ` Péter Ujfalusi
2011-06-17 9:51 ` Mark Brown
2011-06-17 10:57 ` Péter Ujfalusi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=100646074.zaKeYdXKr4@barack \
--to=peter.ujfalusi@ti.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=lrg@ti.com \
--cc=misael.lopez@ti.com \
--cc=sameo@linux.intel.com \
--cc=tj@kernel.org \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).