From: Doug Anderson <dianders@chromium.org>
To: Stephen Boyd <swboyd@chromium.org>
Cc: Mark Brown <broonie@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Matthias Kaehlcke <mka@chromium.org>
Subject: Re: [PATCH] regulator: Avoid grabbing regulator lock during suspend/resume
Date: Tue, 4 Aug 2020 21:55:21 -0700 [thread overview]
Message-ID: <CAD=FV=WafrkdkwnLofw_S9TYXQ9kQT_ZrMEGGzGnmKA17ypEPQ@mail.gmail.com> (raw)
In-Reply-To: <20200804070837.1084024-1-swboyd@chromium.org>
Hi,
On Tue, Aug 4, 2020 at 12:08 AM Stephen Boyd <swboyd@chromium.org> wrote:
>
> I see it takes about 5us per regulator to grab the lock, check that this
> regulator isn't going to do anything for suspend, and then release the
> lock. When that is combined with PMICs that have dozens of regulators we
> get into a state where we spend a few miliseconds doing a bunch of
> locking operations synchronously to figure out that there's nothing to
> do. Let's reorganize the code here a bit so that we don't grab the lock
> until we're actually going to do something so that suspend is a little
> faster.
>
> Cc: Matthias Kaehlcke <mka@chromium.org>
> Cc: Douglas Anderson <dianders@chromium.org>
> Signed-off-by: Stephen Boyd <swboyd@chromium.org>
> ---
> drivers/regulator/core.c | 75 +++++++++++++++++++++++++++-------------
> 1 file changed, 51 insertions(+), 24 deletions(-)
Looks good to me. Agree that getting a pointer to the relevant
"struct regulator_state" and checking whether some details about it
and our ops should be safe to do without a lock. Patch looks clean
and correct.
Reviewed-by: Douglas Anderson <dianders@chromium.org>
next prev parent reply other threads:[~2020-08-05 4:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-04 7:08 [PATCH] regulator: Avoid grabbing regulator lock during suspend/resume Stephen Boyd
2020-08-05 4:55 ` Doug Anderson [this message]
2020-08-18 16:56 ` Mark Brown
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='CAD=FV=WafrkdkwnLofw_S9TYXQ9kQT_ZrMEGGzGnmKA17ypEPQ@mail.gmail.com' \
--to=dianders@chromium.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mka@chromium.org \
--cc=swboyd@chromium.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).