From: "Paul E. McKenney" <paulmck@kernel.org>
To: jstultz@google.com, tglx@linutronix.de, sboyd@kernel.org
Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com, riel@surriel.com
Subject: [PATCH clocksource-wdtest] Print time values for short udelay(1)
Date: Thu, 12 Dec 2024 10:56:20 -0800 [thread overview]
Message-ID: <717a2ddf-a80f-490b-aa3a-4e4b74fa56ca@paulmck-laptop> (raw)
When a pair of clocksource reads separated by a udelay(1) claim less
than a full microsecond of elapsed time, print the measured delay as
part of the splat.
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: John Stultz <jstultz@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Stephen Boyd <sboyd@kernel.org>
diff --git a/kernel/time/clocksource-wdtest.c b/kernel/time/clocksource-wdtest.c
index 62e73444ffe45..38dae590b29f5 100644
--- a/kernel/time/clocksource-wdtest.c
+++ b/kernel/time/clocksource-wdtest.c
@@ -137,7 +137,8 @@ static int wdtest_func(void *arg)
udelay(1);
j2 = clocksource_wdtest_ktime.read(&clocksource_wdtest_ktime);
pr_info("--- tsc-like times: %lu - %lu = %lu.\n", j2, j1, j2 - j1);
- WARN_ON_ONCE(time_before(j2, j1 + NSEC_PER_USEC));
+ WARN_ONCE(time_before(j2, j1 + NSEC_PER_USEC),
+ "Expected at least 1000ns, got %lu.\n", j2 - j1);
/* Verify tsc-like stability with various numbers of errors injected. */
max_retries = clocksource_get_max_watchdog_retry();
next reply other threads:[~2024-12-12 18:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-12 18:56 Paul E. McKenney [this message]
2025-01-15 18:54 ` [tip: timers/core] clocksource/wdtest: " tip-bot2 for Paul E. McKenney
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=717a2ddf-a80f-490b-aa3a-4e4b74fa56ca@paulmck-laptop \
--to=paulmck@kernel.org \
--cc=jstultz@google.com \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=riel@surriel.com \
--cc=sboyd@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
all inboxes | Powered by JetHome®