From: Mark Brown <broonie@kernel.org>
To: Brian Norris <briannorris@chromium.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Matthias Kaehlcke <mka@chromium.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] regulator: core: Replace _regulator_enable_delay() with fsleep()
Date: Wed, 20 Apr 2022 22:11:57 +0100 [thread overview]
Message-ID: <YmB3HWEIv8m+BP1w@sirena.org.uk> (raw)
In-Reply-To: <YmBPyJfN7we4k78/@google.com>
[-- Attachment #1: Type: text/plain, Size: 1312 bytes --]
On Wed, Apr 20, 2022 at 11:24:08AM -0700, Brian Norris wrote:
> On Wed, Apr 20, 2022 at 05:28:46PM +0100, Mark Brown wrote:
> > Did the issue with the delay functions preferring delays on the higher
> > end of the allowed range get fixed? That might be an issue for larger
> > usleep() values.
> Hmm, good question. I had a faint memory of this problem, and searching
> around, I couldn't find that anybody *thought* they fixed it, and I
> found evidence to the contrary (some reports complaining about, e.g.,
> boot-time performance issues in drivers/usb due to the same, with no
> indication that anybody truly fixed the problem).
That's what I feared :/
> So maybe it's better to retain the regulator core helper
> (_regulator_enable_delay()) and rename/repurpose it for my patch 1?
Sounds like a plan.
> I feel like there's some room for improvement in either fsleep() or
> usleep_range() or both, but I'm not sure exactly how to go about that
> right now.
It's really difficult to design an API that's both tasteful and clear
about intent - it's relatively easy for something like a driver that
just has a single hard coded value so you can just use usleep_range()
directly but it gets awkward once you start being generic and the code
really has no idea what the actual delay it's dealing with is.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2022-04-20 21:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-18 21:12 [PATCH 1/2] regulator: core: Sleep (not delay) in set_voltage() Brian Norris
2022-04-18 21:12 ` [PATCH 2/2] regulator: core: Replace _regulator_enable_delay() with fsleep() Brian Norris
2022-04-18 22:53 ` Matthias Kaehlcke
2022-04-20 16:28 ` Mark Brown
2022-04-20 18:24 ` Brian Norris
2022-04-20 21:11 ` Mark Brown [this message]
2022-04-18 22:50 ` [PATCH 1/2] regulator: core: Sleep (not delay) in set_voltage() Matthias Kaehlcke
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=YmB3HWEIv8m+BP1w@sirena.org.uk \
--to=broonie@kernel.org \
--cc=briannorris@chromium.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mka@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
all inboxes | Powered by JetHome®