From patchwork Thu Oct 20 14:26:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Maciej S. Szmigiero" X-Patchwork-Id: 6225 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp148413wrr; Thu, 20 Oct 2022 07:40:56 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7NMW+MQPtl/v5hVFTS8I8qCvvBeQkMZGquwMW+kU2xYR0STvCfawf8EXno1kUQvGyUcWzF X-Received: by 2002:a65:6e0e:0:b0:434:59e0:27d3 with SMTP id bd14-20020a656e0e000000b0043459e027d3mr11725310pgb.185.1666276856491; Thu, 20 Oct 2022 07:40:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666276856; cv=none; d=google.com; s=arc-20160816; b=y955MdlSN8j9RuKL4H1dNLE7BkN3cIBE5LHLhyDWHhZFlVJjzC2hvqtsKsDYZVW06Z KhjbEStQ4+kAcuVm7lfzBEnDbfZcMyUW6hw3tb+CguUUo9zWCmCrmjX9ALLDr7mBVv9O 8ZsFOhErrA43MUw++DodMvC136M9UkRMEpmKGQg3O2JZ+CVERJJjr2ZvdaPbjoR2v8VT Qo0uW26D8iI6W54uHCB2rsGpWtureI0GPzDdYfgCf9jMVQF33JNmomIOcCk1ERdsv3qp Nsb3LFbRr7KcwlLRqWDvt4Jm4BcgtAd5Uk5PyAbbYZ5iULsq85rP4zgSADDw3ti4gu9f Pvrg== 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 :message-id:date:subject:cc:to:from; bh=W6AmRUwnbDKIOqmHGGBBGTpBc5taHplx30SLwCodPpk=; b=lhHTFfvevaHCB7N8TPWZ/tP/HW18WBtV+llcd7H9xK7QHKz0flz5/20O8k2BHI7FKq K2VA02kr3dq3ggwixNspaIbP7fW0rlthwlIcHU3E6dbUVSXk1ZGcFCm6ZxwZCM2GuCoe rrGI/Jkw2NgHdlkAE/5X/IieXLS27+lyLEPr12NScRvcpzf/S7WZ7h3I2vVPf+Ukrk3X ilGozdR5qt0SHAcncVWaZxGLx4Vcdy4+j1NIFXCrBsxDGHYDpBQQaLg4jf8D1SwMzxhp fjeGD06x5c6BYWbsRLdX/aHXzzAmqH1z52Qwl83MNNYIjf3EtIFUqlJ/VpJlLhVFi2Jr NBEw== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x16-20020a63f710000000b0045beac6749csi22424708pgh.633.2022.10.20.07.40.36; Thu, 20 Oct 2022 07:40:56 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230170AbiJTO0a (ORCPT + 99 others); Thu, 20 Oct 2022 10:26:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230180AbiJTO02 (ORCPT ); Thu, 20 Oct 2022 10:26:28 -0400 Received: from vps-vb.mhejs.net (vps-vb.mhejs.net [37.28.154.113]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 549A31AFA8A for ; Thu, 20 Oct 2022 07:26:25 -0700 (PDT) Received: from MUA by vps-vb.mhejs.net with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1olWUx-000601-0e; Thu, 20 Oct 2022 16:26:15 +0200 From: "Maciej S. Szmigiero" To: John Stultz , Thomas Gleixner , Stephen Boyd Cc: linux-kernel@vger.kernel.org Subject: [PATCH][RESEND] clocksource: downgrade messages about skipping watchdog check under load Date: Thu, 20 Oct 2022 16:26:09 +0200 Message-Id: <841757364754f8d0a8834982ca16da10a6a44d72.1666275945.git.maciej.szmigiero@oracle.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747217920904430979?= X-GMAIL-MSGID: =?utf-8?q?1747217920904430979?= From: "Maciej S. Szmigiero" Since commit c86ff8c55b8a ("clocksource: Avoid accidental unstable marking of clocksources") the watchdog check is skipped if two consecutive watchdog reads are too far apart. This might happen, for example, when the system is under heavy load, so it isn't a totally unexpected condition. Since some systems are prone to producing significant number of these messages when the system is constantly under heavy load downgrade their log level to "debug" to avoid filling the kernel log in such case. These messages can then still be enabled via dyndbg mechanism in case someone really needs to see them. Signed-off-by: Maciej S. Szmigiero --- kernel/time/clocksource.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c index cee5da1e54c41..ff99b25bc1aec 100644 --- a/kernel/time/clocksource.c +++ b/kernel/time/clocksource.c @@ -236,8 +236,8 @@ static enum wd_read_status cs_watchdog_read(struct clocksource *cs, u64 *csnow, watchdog->shift); if (wd_delay <= WATCHDOG_MAX_SKEW) { if (nretries > 1 || nretries >= max_cswd_read_retries) { - pr_warn("timekeeping watchdog on CPU%d: %s retried %d times before success\n", - smp_processor_id(), watchdog->name, nretries); + pr_debug("timekeeping watchdog on CPU%d: %s retried %d times before success\n", + smp_processor_id(), watchdog->name, nretries); } return WD_READ_SUCCESS; } @@ -262,10 +262,10 @@ static enum wd_read_status cs_watchdog_read(struct clocksource *cs, u64 *csnow, return WD_READ_UNSTABLE; skip_test: - pr_info("timekeeping watchdog on CPU%d: %s wd-wd read-back delay of %lldns\n", - smp_processor_id(), watchdog->name, wd_seq_delay); - pr_info("wd-%s-wd read-back delay of %lldns, clock-skew test skipped!\n", - cs->name, wd_delay); + pr_debug("timekeeping watchdog on CPU%d: %s wd-wd read-back delay of %lldns\n", + smp_processor_id(), watchdog->name, wd_seq_delay); + pr_debug("wd-%s-wd read-back delay of %lldns, clock-skew test skipped!\n", + cs->name, wd_delay); return WD_READ_SKIP; }