linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Aaron Lu <ziqianlu@bytedance.com>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: John Stultz <jstultz@google.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Stephen Boyd <sboyd@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: [PATCH] clocksource: Use correct limit for wd-cs-wd read back delay in printing
Date: Thu, 31 Jul 2025 20:04:54 +0800	[thread overview]
Message-ID: <20250731120454.GA309@bytedance> (raw)

With commit 4ac1dd3245b9("clocksource: Set cs_watchdog_read() checks
based on .uncertainty_margin"), the limit for wd-cs-wd read back delay
is changed from the static WATCHDOG_MAX_SKEW to dynamic ones based on
watchdog and cs' uncertainty_margin, but WATCHDOG_MAX_SKEW is still used
when dumping information.

Fix this by using the actual limit: md(2 * watchdog->uncertainty_margin)
+ cs->unvertainty_margin.

Signed-off-by: Aaron Lu <ziqianlu@bytedance.com>
---
 kernel/time/clocksource.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index e400fe150f9d7..ae0fcd5af41c2 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -290,7 +290,7 @@ static enum wd_read_status cs_watchdog_read(struct clocksource *cs, u64 *csnow,
 	}
 
 	pr_warn("timekeeping watchdog on CPU%d: wd-%s-wd excessive read-back delay of %lldns vs. limit of %ldns, wd-wd read-back delay only %lldns, attempt %d, marking %s unstable\n",
-		smp_processor_id(), cs->name, wd_delay, WATCHDOG_MAX_SKEW, wd_seq_delay, nretries, cs->name);
+		smp_processor_id(), cs->name, wd_delay, md + cs->uncertainty_margin, wd_seq_delay, nretries, cs->name);
 	return WD_READ_UNSTABLE;
 
 skip_test:
-- 
2.39.5


             reply	other threads:[~2025-07-31 12:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-31 12:04 Aaron Lu [this message]
2025-08-01  1:48 ` [PATCH] clocksource: Use correct limit for wd-cs-wd read back delay in printing kernel test robot
2025-08-01  2:42   ` Aaron Lu

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=20250731120454.GA309@bytedance \
    --to=ziqianlu@bytedance.com \
    --cc=jstultz@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).