From: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
To: Gao Pan <b54642-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
B20596-KZfg59tc24xl57MIdRCFDg@public.gmane.org,
b38611-KZfg59tc24xl57MIdRCFDg@public.gmane.org,
u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org
Subject: Re: [Patch v2] i2c: imx: add runtime pm support to improve the performance
Date: Sun, 2 Aug 2015 00:40:42 +0200 [thread overview]
Message-ID: <20150801224042.GA1528@katana> (raw)
In-Reply-To: <1434619651-5720-1-git-send-email-b54642-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1623 bytes --]
On Thu, Jun 18, 2015 at 05:27:31PM +0800, Gao Pan wrote:
> In our former i2c driver, i2c clk is enabled and disabled in
> xfer function, which contributes to power saving. However,
> the clk enable process brings a busy wait delay until the core
> is stable. As a result, the performance is sacrificed.
>
> To weigh the power consumption and i2c bus performance, runtime
> pm is the good solution for it. The clk is enabled when a i2c
> transfer starts, and disabled after a specifically defined delay.
>
> Without the patch the test case (many eeprom reads) executes with approx:
> real 1m7.735s
> user 0m0.488s
> sys 0m20.040s
>
> With the patch the same test case (many eeprom reads) executes with approx:
> real 0m54.241s
> user 0m0.440s
> sys 0m5.920s
>
> From the test result, the patch get better performance.
Looks OK to me. coccicheck says something, though:
drivers/i2c/busses/i2c-imx.c:1098:7-26: pm_runtime_get_sync returns < 0 as error. Unecessary IS_ERR_VALUE at line 1099
drivers/i2c/busses/i2c-imx.c:896:10-29: pm_runtime_get_sync returns < 0 as error. Unecessary IS_ERR_VALUE at line 897
Please fix that and add "kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org" to CC when resending. I know
they use the driver a lot.
> V2:
> As Uwe Kleine-König's suggestion, the version do below changes:
> - call clk_prepare_enable in probe to avoid never enabling clock
> if CONFIG_PM is disabled
> - enable clock before request IRQ in probe
> - remove the pm staff in i2c_imx_isr
Thanks for this info. If you could put it below "---" that would be preferred by me.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-08-01 22:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-18 9:27 [Patch v2] i2c: imx: add runtime pm support to improve the performance Gao Pan
[not found] ` <1434619651-5720-1-git-send-email-b54642-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2015-08-01 22:40 ` Wolfram Sang [this message]
2015-08-03 2:03 ` Gao Pandy
[not found] <BLUPR03MB37360B2C3CE0F0B9A573288F5AA0@BLUPR03MB373.namprd03.prod.outlook.com>
[not found] ` <BLUPR03MB37360B2C3CE0F0B9A573288F5AA0-GeMU99GfrrsHjcGqcGfFzOO6mTEJWrR4XA4E9RH9d+qIuWR1G4zioA@public.gmane.org>
2015-06-29 7:27 ` Gao Pandy
[not found] ` <CY1PR0301MB08582F8930022DB926A8DDF7CFAA0-YrwGdl+PljlUWoKpOwApjpwN6zqB+hSMnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2015-07-09 14:31 ` Li Frank
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=20150801224042.GA1528@katana \
--to=wsa-z923lk4zbo2bacvfa/9k2g@public.gmane.org \
--cc=B20596-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
--cc=b38611-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
--cc=b54642-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
/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).