From: slash.tmp@free.fr (Mason)
To: linux-arm-kernel@lists.infradead.org
Subject: Guarantee udelay(N) spins at least N microseconds
Date: Fri, 10 Apr 2015 23:22:56 +0200 [thread overview]
Message-ID: <55283F30.7030109@free.fr> (raw)
In-Reply-To: <20150410204221.GI12732@n2100.arm.linux.org.uk>
On 10/04/2015 22:42, Russell King - ARM Linux wrote:
> On Fri, Apr 10, 2015 at 10:01:35PM +0200, Mason wrote:
>> There is, however, an important difference between loop-based
>> delays and timer-based delays; CPU frequencies typically fall
>> in the 50-5000 MHz range, while timer frequencies typically
>> span tens of kHz up to hundreds of MHz. For example, 90 kHz
>> is sometimes provided in multimedia systems (MPEG TS).
>
> Why would you want to use such a slowly clocked counter for something
> which is supposed to be able to produce delays in the micro-second and
> potentially the nanosecond range?
>
> get_cycles(), which is what the timer based delay is based upon, is
> supposed to be a _high resolution counter_, preferably running at
> the same kind of speeds as the CPU, though with a fixed clock rate.
> It most definitely is not supposed to be in the kHz range.
If there's only a single fixed clock in the system, I'd
use it for sched_clock, clocksource, and timer delay.
Are there other options?
It was you who wrote some time ago: "Timers are preferred
because of the problems with the software delay loop."
(My system implements DVFS.)
It seems to me that a 90 kHz timer is still better than
the jiffy counter, or am I mistaken again?
Regards.
next prev parent reply other threads:[~2015-04-10 21:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-10 11:25 Guarantee udelay(N) spins at least N microseconds Mason
2015-04-10 11:42 ` Willy Tarreau
2015-04-10 14:53 ` Mason
2015-04-10 15:06 ` Willy Tarreau
2015-04-10 11:44 ` Russell King - ARM Linux
2015-04-10 12:41 ` Mason
2015-04-10 15:06 ` Russell King - ARM Linux
2015-04-10 15:30 ` Mason
2015-04-10 16:08 ` Russell King - ARM Linux
2015-04-10 20:01 ` Mason
2015-04-10 20:42 ` Russell King - ARM Linux
2015-04-10 21:22 ` Mason [this message]
2015-04-11 7:30 ` Russell King - ARM Linux
2015-04-11 11:57 ` Mason
2015-04-11 12:10 ` Russell King - ARM Linux
2015-04-11 13:45 ` Mason
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=55283F30.7030109@free.fr \
--to=slash.tmp@free.fr \
--cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.