public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: John Stultz <john.stultz@linaro.org>
To: David Riley <davidriley@chromium.org>,
	Thomas Gleixner <tglx@linutronix.de>
Cc: Doug Anderson <dianders@chromium.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/2] Add test to validate udelay
Date: Tue, 06 May 2014 17:25:33 -0700	[thread overview]
Message-ID: <53697D7D.4020908@linaro.org> (raw)
In-Reply-To: <1399421543-7751-1-git-send-email-davidriley@chromium.org>

On 05/06/2014 05:12 PM, David Riley wrote:
> This change adds a module and a script that makes use of it to
> validate that udelay delays for at least as long as requested
> (as compared to ktime).

Interesting.

So fundamentally, udelay is a good bit fuzzier accuracy wise then
ktime_get(), as it may be backed by relatively coarsely calibrated delay
loops, or very rough tsc freq estimates.

ktime_get on the other hand is as fine grained as we can be, and is ntp
corrected, so that a second can really be a second.

So your comparing the fast and loose interface so we can delay a bit
before hitting some hardware again with a fairly precise interface.
Thus  I'd not be surprised if your test failed on various hardware. I'd
really only trust udelay to be roughly accurate, so you might want to
consider adding some degree of acceptable error to the test.

Really, I'm curious about the backstory that made you generate the test?
I assume something bit you where udelay was way off? Or were you using
udelay for some sort of accuracy sensitive use?

thanks
-john


  parent reply	other threads:[~2014-05-07  0:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-07  0:12 [PATCH 0/2] Add test to validate udelay David Riley
2014-05-07  0:12 ` [PATCH 1/2] kernel: time: Add udelay_test module " David Riley
2014-05-07  0:12 ` [PATCH 2/2] tools: add script to test udelay David Riley
2014-05-14 22:49   ` Doug Anderson
2014-05-07  0:25 ` John Stultz [this message]
2014-05-07  4:19   ` [PATCH 0/2] Add test to validate udelay Doug Anderson
2014-05-07 17:02     ` David Riley
2014-05-07 18:10     ` John Stultz
2014-05-07 18:32       ` Doug Anderson
2014-05-07 22:46         ` John Stultz
2014-05-07 23:54           ` Doug Anderson
2014-05-14 22:30 ` [PATCH v2 " David Riley
2014-05-14 22:30   ` [PATCH v2 1/2] kernel: time: Add udelay_test module " David Riley
2014-05-14 22:30   ` [PATCH v2 2/2] tools: add script to test udelay David Riley
2014-06-09 23:41   ` [PATCH v2 0/2] Add test to validate udelay David Riley
2014-06-11 16:59     ` John Stultz

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=53697D7D.4020908@linaro.org \
    --to=john.stultz@linaro.org \
    --cc=davidriley@chromium.org \
    --cc=dianders@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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