Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp307570rwi; Wed, 2 Nov 2022 12:09:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4bVpAgUPnP4Q9i1QxydBETRwdWv/41HYhJUe6As0Xk7VWrDaTCGTkcF0x5XLS/jnrs+Utt X-Received: by 2002:a17:907:7617:b0:7ad:c0d5:bdf1 with SMTP id jx23-20020a170907761700b007adc0d5bdf1mr19669510ejc.211.1667416160681; Wed, 02 Nov 2022 12:09:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667416160; cv=none; d=google.com; s=arc-20160816; b=uknK42lyqkMD9y2iSuQaC4DaxtiX7S/LkX5fX22I+QqZiO7CA1Oqq/LJ4+7eTxWcRm nf50H5CJcnyHLMf64o3MaXQiLZtmr+jfX1LfZUojEkasYBDnUGJ0leWvK5Kwidqe6eQ5 L1yaxV0QtXThiLEDTBmQq/W+UCRQTZJflip/0fpqafidRibz6KRQuhblJutuRrAgv0Sc ubuOMzdWakXcdVqXR3tf7XyrYMLT9KceqZ0mllC9dgFs4+vH49kTKBAMY9mLrpah3zex h1miHXkXdBrbGvB+BSzHy8rBhnxyYyTS1HAgApYSvfNtienSdH2xpJ0OjkBCzV+py1o5 Ftmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=pfJ2mPlz7LSG8r7QIqweVCqQzuN2sKCXJEtbT5SBnCo=; b=o9rysRCWxAiTFocjsMTNldhMScwELg5j4T64p0Y+F+OXMVEftAfilUMgh6CsU8PR2t oncIYdTSFssXrz7uNcw2zLggPMgxewVUMxLxY3GKtLPCTr5EKhYmKXmNN+LQxOktEgDK 1f6rbrFtHJ/7Ghlcnj7KfgJrAx6IaQWutZx73Xliaq6sB2HMrHjOi/KhNZYJzLuAmrJq X9ftmIhUxRUf/+suyoA9pDEdPWkOkjkOUqBGBXv+CTwJsEO4JG/yhvdq/EB/uXPAkR3H IiC+4/5oxUG+qGLDktCw/OjKZMHe66wgbqCzjsKXOiaNyv7tsDF6+BmkeuJSnhY8xdS3 DGRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="oOPiGX/M"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k15-20020a1709061c0f00b006feb76dbd51si12455449ejg.289.2022.11.02.12.08.56; Wed, 02 Nov 2022 12:09:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="oOPiGX/M"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231237AbiKBSkQ (ORCPT + 98 others); Wed, 2 Nov 2022 14:40:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230526AbiKBSkO (ORCPT ); Wed, 2 Nov 2022 14:40:14 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 526D42FA for ; Wed, 2 Nov 2022 11:40:13 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id DC822B82433 for ; Wed, 2 Nov 2022 18:40:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 84177C433D6; Wed, 2 Nov 2022 18:40:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667414410; bh=QDzLlEsdJgBZfwCe8fdmspQ4lio25AEQNSzuvHZI6ZU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oOPiGX/M5djAqWhXtUaku0rxJ5mAilaYczj6k7j7MtJo6Tmkwc1sYfYOlgYiI27Nk VnRB6Maz1sSNTubTnml6bEBh90vY+rh5txbOgv8DEOfj2d/sAXLCww17SYH82X5YkS yXO2z8MApivd7vyuDAsZyf1c/JtHoatzZ3Rv0V/K+O26jcejH8sdHtSnpUJXbbgx6K dfJuyj2Sk9+/eGw+y+Gi88/Y8eVCGOpxTwyKKU8SkAWirAk7Gk8rgGFnA+Tj7iPbk1 RywLpHvtNsuL9+Si2Vmeb8Bny9cjpkAlPviby8mubnG22nkQ0D0IJilU0j3O62GT/U E/Fc5tBi0PiOw== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 3F37B5C1813; Wed, 2 Nov 2022 11:40:10 -0700 (PDT) From: "Paul E. McKenney" To: tglx@linutronix.de Cc: linux-kernel@vger.kernel.org, john.stultz@linaro.org, sboyd@kernel.org, corbet@lwn.net, Mark.Rutland@arm.com, maz@kernel.org, kernel-team@meta.com, neeraju@codeaurora.org, ak@linux.intel.com, feng.tang@intel.com, zhengjun.xing@intel.com, "Paul E. McKenney" , John Stultz , Waiman Long Subject: [PATCH clocksource 1/2] clocksource: Add comments to classify bogus measurements Date: Wed, 2 Nov 2022 11:40:08 -0700 Message-Id: <20221102184009.1306751-1-paulmck@kernel.org> X-Mailer: git-send-email 2.31.1.189.g2e36527f23 In-Reply-To: <20221102184001.GA1306489@paulmck-ThinkPad-P17-Gen-1> References: <20221102184001.GA1306489@paulmck-ThinkPad-P17-Gen-1> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org An extremely busy system can delay the clocksource watchdog, so that the corresponding too-long bogus-measurement error does not necessarily imply an error in the system. However, a too-short bogus-measurement error likely indicates a bug in hardware, firmware or software. Therefore, add comments clarifying these bogus-measurement pr_warn()s. Reported-by: Feng Tang Signed-off-by: Paul E. McKenney Cc: John Stultz Cc: Thomas Gleixner Cc: Stephen Boyd Cc: Feng Tang Cc: Waiman Long --- kernel/time/clocksource.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c index dcaf38c062161..3f5317faf891f 100644 --- a/kernel/time/clocksource.c +++ b/kernel/time/clocksource.c @@ -443,10 +443,12 @@ static void clocksource_watchdog(struct timer_list *unused) /* Check for bogus measurements. */ wdi = jiffies_to_nsecs(WATCHDOG_INTERVAL); if (wd_nsec < (wdi >> 2)) { + /* This usually indicates broken timer code or hardware. */ pr_warn("timekeeping watchdog on CPU%d: Watchdog clocksource '%s' advanced only %lld ns during %d-jiffy time interval, skipping watchdog check.\n", smp_processor_id(), watchdog->name, wd_nsec, WATCHDOG_INTERVAL); continue; } if (wd_nsec > (wdi << 2)) { + /* This can happen on busy systems, which can delay the watchdog. */ pr_warn("timekeeping watchdog on CPU%d: Watchdog clocksource '%s' advanced an excessive %lld ns during %d-jiffy time interval, probable CPU overutilization, skipping watchdog check.\n", smp_processor_id(), watchdog->name, wd_nsec, WATCHDOG_INTERVAL); continue; } -- 2.31.1.189.g2e36527f23