Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp2190709rwi; Thu, 3 Nov 2022 13:53:59 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4EBj90mZntM5Z1/H3EY9CnEHp2rZMofbgSre4E/o+tU0puveqDWB8BcZfIqOVDZcPNar3E X-Received: by 2002:a05:6402:22a5:b0:462:b393:f281 with SMTP id cx5-20020a05640222a500b00462b393f281mr32454547edb.379.1667508839381; Thu, 03 Nov 2022 13:53:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667508839; cv=none; d=google.com; s=arc-20160816; b=SmSCzCv3gTvs0APnwvV+9AtXEp+hiSBP+XvbuAKZ0e1GKdEN6hq6JJJy64agZBABBF 3KvaPzcErXmXKMoJMyEEvRZTqsQWMSHsO0hMenL3VdUOSreHRlH9Ctaz8WDYJNT8rEkE XRNoYAvTRVF3+0oizhELPjeQTcqfddmmK1Ls6D0p/WWdZXdawg7tJYPVHMNMRa8GiJ4F oWsrdED39v62hsyeXHTHJlSqhbjTNnWdwD6/TvKKZFyc9BjDxKkaNKG8XsVvgTePmpf2 jPvo2JrzF8S0Jk/MfA0OtWp9k7FM/ZRfeEWRcMiPXi0rVbRS98J+p37uwKypQTHDH0ES 4BBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=YPpCeWv/Jg7xZ8OoLKT9WKES79jDSJrPYVj/1ugxMV0=; b=d5mPKFNTYgYL+ikDyb2Ci7I6b4lfMsBBNgDqltIp5ls0DIhPTsdDSJ/8RnQgc3oBkQ NwRLGLElbFuSkqXaSOuuK0FxJkTwZAHpeG02z3MLmoTdXjFUP3m9ENCa/2dfL2zd/f3b HYPr/m69h4f2kjMalPU061IEJjhqR1GIqc8ycySxUEjRt8CR8SzTQbgsTPDSEwS3Trfi TUUkpEgUJxEahLgoFKngV8yrGViEW1/I1sG6F5kS1CxFnnDxHAoMCBENFMhEvn/LBwGM /9eTiQVY6KbrwGhPp2X/gCJZxz1VrAjl7uMCZdlUgE7ObAokVaPWUAo/QENQEiQu7zMH aMHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ww4fEFfp; 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 u17-20020a50c2d1000000b00458cba4c78bsi1934249edf.416.2022.11.03.13.53.36; Thu, 03 Nov 2022 13:53:59 -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=Ww4fEFfp; 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 S231174AbiKCUru (ORCPT + 97 others); Thu, 3 Nov 2022 16:47:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230165AbiKCUrn (ORCPT ); Thu, 3 Nov 2022 16:47:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8E632099A for ; Thu, 3 Nov 2022 13:47:42 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 50D7761FEF for ; Thu, 3 Nov 2022 20:47:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AD0C2C433D6; Thu, 3 Nov 2022 20:47:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667508461; bh=oqB9T2bu1tM/srukG0Yi/N8D4Z0pS3imx2as+1NNehY=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=Ww4fEFfpAhBTyrYGbNJipbnAVNrWmEyw5LGHkqVF/hbZGJtCx4V2wac6lXFMlk1zI UCzMMLzbVUQq3bFjHOfr8+NT/LQ1jJv28Yk33Lm4zP96umAjoAn1OZzR3MQxNBIY3I U/sdQ4OQoZbQDPVV6FFNrQr45nYv+zYdNyZjLmLfZCclElVfHljxVQ9g3ck1hCCN8d bSGrjikr+F69GN8SvXSIKUtNGUaNupYRGAXtTYG5ZwQyTxECoTWtUufm6+82a6BKpk xKDgqAyCycgprFzvMbfe+7M+bIIngc5Ygwo9clgwHDW++F/NNwgcyCpta7EJQdql9U qSxtklgOIfYcQ== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 5B9155C097E; Thu, 3 Nov 2022 13:47:41 -0700 (PDT) Date: Thu, 3 Nov 2022 13:47:41 -0700 From: "Paul E. McKenney" To: Waiman Long Cc: tglx@linutronix.de, 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, John Stultz Subject: Re: [PATCH clocksource 1/2] clocksource: Add comments to classify bogus measurements Message-ID: <20221103204741.GE5600@paulmck-ThinkPad-P17-Gen-1> Reply-To: paulmck@kernel.org References: <20221102184001.GA1306489@paulmck-ThinkPad-P17-Gen-1> <20221102184009.1306751-1-paulmck@kernel.org> <7339298b-1156-2d24-7dd9-e7fae690773c@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7339298b-1156-2d24-7dd9-e7fae690773c@redhat.com> 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 On Wed, Nov 02, 2022 at 10:23:25PM -0400, Waiman Long wrote: > On 11/2/22 14:40, Paul E. McKenney wrote: > > 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; > > } > > Looks good. > > Reviewed-by: Waiman Long Applied, thank you! Thanx, Paul