Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp2805898pxb; Mon, 18 Apr 2022 08:36:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwFYEx9GdJ2aejCb6n3YtQyWBHn2Gnj/53+ZMy3vS8xdTJw/dLxXmjcaMUgjPITnY5lZrq X-Received: by 2002:a65:5b81:0:b0:3aa:1671:c6a7 with SMTP id i1-20020a655b81000000b003aa1671c6a7mr2244619pgr.169.1650296219377; Mon, 18 Apr 2022 08:36:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650296219; cv=none; d=google.com; s=arc-20160816; b=UuZNkVGmpsEUJUWhR75gAvYuNa29K3k9HSzOwplZCMF11EQnj7F5DY71oOuvhoXSTz TtR1TPs0KnfgM7FpbsToQcHqJoB/Ysor09a9hH+QICb1NxTl3lp1yv8wST10WZxgVxW+ VWKhHISWBHbcHIaVsRPmeTTmTw3mV7RHIDDuWk0aR8yz5+fJeY1doo+uRMDuvFvOcWpT /T8n7Cy8EiYBL85UNwky4txfnsdIU6/T3J3N51JZhmrYUE80+B3jq3IuDESdS6bZq/ja oIDBqvlTgTV6sHXBe8f4j3iNVeETXMB7SQnpJ1AEf/9exZOpYfquQYC8qgs0VWQynbpO L3rQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=WvplVkEpik5QLMp3cfPe3OH9rIcSF8av+qRsx7GSySg=; b=OPhHsmQTpj2Hoo0D5AKkgenZL8g0llZQkNJrwvCxbs6/ozeHNHD5YPYjFsnNdXRFXK gp51QSGp4CTTn6X8g9jmRvOweWxtzELhieHA43/OXwjzjN9Y0bZsMkVyA+rFhXc0tlJj E9/GWWpMUFRGVUd8xIrdSRHf/EV9JQ5cKHY6tqbmzIj5pkkPcJnEeWjhBlkrYzMbZqFp 4LjvliPNyH9CKiWFGk+Y6qXQPDuMGblf7zfioZn74KZy+hyrdygyoEtxGZECQ98MtMTH 1aMy9rgp27WoYAKARqwsavr08HONoBSdAUvitPUs/tVMN/OCGHe4qQbn8gSKN1JoFypg oMrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=okkD8Kx1; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e3-20020a654783000000b0039cb90dd2e9si9448811pgs.132.2022.04.18.08.36.43; Mon, 18 Apr 2022 08:36: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=@linuxfoundation.org header.s=korg header.b=okkD8Kx1; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236230AbiDRMly (ORCPT + 99 others); Mon, 18 Apr 2022 08:41:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239725AbiDRMdW (ORCPT ); Mon, 18 Apr 2022 08:33:22 -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 1BC77BC97; Mon, 18 Apr 2022 05:25:18 -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 AE43E60FDF; Mon, 18 Apr 2022 12:25:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A27D1C385A7; Mon, 18 Apr 2022 12:25:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650284717; bh=1JykyhsvrgAJMNPlqTzg89ghRr1ddfmnxPAANLww/Ho=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=okkD8Kx1ZbUAc6F4ZoFvw6pX7901TnPsLHEqTsOvHU1PPLtnD+o5BvGYOI3RIMMdS NG8chS0dWxv9lCVVuvldQ01AZ5HGGoANcumGZP63HK6ApksjScDRn3sE4486WrsgFk IUAruogB/YTgNnV2E0yB0NCNSdodOZ3mmVp/oln4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paul Gortmaker , Thomas Gleixner Subject: [PATCH 5.17 204/219] tick/nohz: Use WARN_ON_ONCE() to prevent console saturation Date: Mon, 18 Apr 2022 14:12:53 +0200 Message-Id: <20220418121212.579747555@linuxfoundation.org> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220418121203.462784814@linuxfoundation.org> References: <20220418121203.462784814@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 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,T_SCC_BODY_TEXT_LINE 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 From: Paul Gortmaker commit 40e97e42961f8c6cc7bd5fe67cc18417e02d78f1 upstream. While running some testing on code that happened to allow the variable tick_nohz_full_running to get set but with no "possible" NOHZ cores to back up that setting, this warning triggered: if (unlikely(tick_do_timer_cpu == TICK_DO_TIMER_NONE)) WARN_ON(tick_nohz_full_running); The console was overwhemled with an endless stream of one WARN per tick per core and there was no way to even see what was going on w/o using a serial console to capture it and then trace it back to this. Change it to WARN_ON_ONCE(). Fixes: 08ae95f4fd3b ("nohz_full: Allow the boot CPU to be nohz_full") Signed-off-by: Paul Gortmaker Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20211206145950.10927-3-paul.gortmaker@windriver.com Signed-off-by: Greg Kroah-Hartman --- kernel/time/tick-sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -186,7 +186,7 @@ static void tick_sched_do_timer(struct t */ if (unlikely(tick_do_timer_cpu == TICK_DO_TIMER_NONE)) { #ifdef CONFIG_NO_HZ_FULL - WARN_ON(tick_nohz_full_running); + WARN_ON_ONCE(tick_nohz_full_running); #endif tick_do_timer_cpu = cpu; }