mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Riley <davidriley@chromium.org>
To: Thomas Gleixner <tglx@linutronix.de>,
	John Stultz <john.stultz@linaro.org>
Cc: Russell King <rmk+kernel@armlinux.org.uk>,
	LKML <linux-kernel@vger.kernel.org>,
	David Riley <davidriley@chromium.org>
Subject: [PATCH] kernel: time: Modify test_udelay to allow for 1% tolerance.
Date: Mon, 20 Feb 2017 15:59:08 -0800	[thread overview]
Message-ID: <20170220235908.17541-1-davidriley@chromium.org> (raw)

test_udelay had a tolerance of udelay() being up to 0.5% fast but
that tolerance is insufficient for some platforms.  For ARM, the error
is around 0.7% so increase the test to allow for up to 1% which was
previously described as being acceptable for udelay().

See the following thread for more details:
http://lists.openwall.net/linux-kernel/2011/01/12/372

Cc: John Stultz <john.stultz@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David Riley <davidriley@chromium.org>
---
 kernel/time/test_udelay.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/time/test_udelay.c b/kernel/time/test_udelay.c
index b0928ab..5212925 100644
--- a/kernel/time/test_udelay.c
+++ b/kernel/time/test_udelay.c
@@ -39,8 +39,8 @@ static int udelay_test_single(struct seq_file *s, int usecs, uint32_t iters)
 	uint64_t sum = 0;
 	uint64_t avg;
 	int i;
-	/* Allow udelay to be up to 0.5% fast */
-	int allowed_error_ns = usecs * 5;
+	/* Allow udelay to be up to 1% fast */
+	int allowed_error_ns = usecs * 10;
 
 	for (i = 0; i < iters; ++i) {
 		s64 kt1, kt2;
-- 
2.2.1

             reply	other threads:[~2017-02-20 23:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-20 23:59 David Riley [this message]
2017-02-21  0:27 ` Russell King - ARM Linux

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=20170220235908.17541-1-davidriley@chromium.org \
    --to=davidriley@chromium.org \
    --cc=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk+kernel@armlinux.org.uk \
    --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

all inboxes | Powered by JetHome®