]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
tick/nohz: Use WARN_ON_ONCE() to prevent console saturation
authorPaul Gortmaker <paul.gortmaker@windriver.com>
Mon, 6 Dec 2021 14:59:50 +0000 (09:59 -0500)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 20 May 2022 12:42:37 +0000 (14:42 +0200)
commitf26af8959f73e062ad9083e6c0d640ba904cc240
tree214073c1548fac9e3b3e8c8d4e1a4e37f8814641
parent955d36bafe01e05d7f8a548cccd2548aa9206945
tick/nohz: Use WARN_ON_ONCE() to prevent console saturation

BugLink: https://bugs.launchpad.net/bugs/1969857
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 <paul.gortmaker@windriver.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20211206145950.10927-3-paul.gortmaker@windriver.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
kernel/time/tick-sched.c