Skip to contentSkip to conversation

watchdog: Reduce message verbosity

PATCH New Sinan Kaya 2 participants 2 messages Aug 3, 2018

lore
Share & tools
lore

Sinan Kaya

author
#0 lore raw

PATCH v2 1/1 watchdog: Reduce message verbosity

Code is emitting the following error message during boot on systems without PMU hardware support while probing NMI capability.

NMI watchdog: Perf event create on CPU 0 failed with -2

This error is coming from this path:

lockup_detector_init
watchdog_nmi_probe
hardlockup_detector_perf_init
hardlockup_detector_event_create
perf_event_create_kernel_counter
perf_event_alloc
perf_init_event (9539)
pmu = ERR_PTR(-ENOENT) due to lack of PMUs in the system

followed by the warning that NMI watchdog is disabled as follows.

NMI watchdog: Perf NMI watchdog permanently disabled

While NMI disabled information is usefel for ordinary users, seeing a PERF event create failed with error code -2 is too verbose.

Reducing the message severity to debug so that if somebody is really wants to debug this, they can find out the error source by increasing the kernel loglevel during boot.

---
 kernel/watchdog_hld.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/watchdog_hld.c +2 -2
index e449a23e9d59..1f7020d65d0a 100644
@@ -175,8 +175,8 @@ static int hardlockup_detector_event_create(void)
 	evt = perf_event_create_kernel_counter(wd_attr, cpu, NULL,
 					       watchdog_overflow_callback, NULL);
 	if (IS_ERR(evt)) {
-		pr_info("Perf event create on CPU %d failed with %ld\n", cpu,
-			PTR_ERR(evt));
+		pr_debug("Perf event create on CPU %d failed with %ld\n", cpu,
+			 PTR_ERR(evt));
 		return PTR_ERR(evt);
 	}
 	this_cpu_write(watchdog_ev, evt);
Signature · 1 line
2.17.1
#1 lore raw
watchdog: Reduce message verbosity
Commit-ID:  1b6266ebe3da8198e9a02fbad77bbb56e2f7ce2e
Gitweb:     https://git.kernel.org/tip/1b6266ebe3da8198e9a02fbad77bbb56e2f7ce2e
Author:     Sinan Kaya <[email protected]>
AuthorDate: Thu, 2 Aug 2018 23:09:41 -0700
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Fri, 3 Aug 2018 12:19:08 +0200

watchdog: Reduce message verbosity

Code is emitting the following error message during boot on systems without PMU hardware support while probing NMI capability.

NMI watchdog: Perf event create on CPU 0 failed with -2

This error is emitted as the perf subsystem returns -ENOENT due to lack of PMUs in the system.

It is followed by the warning that NMI watchdog is disabled:

NMI watchdog: Perf NMI watchdog permanently disabled

While NMI disabled information is useful for ordinary users, seeing a PERF event create failed with error code -2 is not.

Reduce the message severity to debug so that if debugging is still possible in case the error code returned by perf is required for analysis.

---
 kernel/watchdog_hld.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/watchdog_hld.c +2 -2
index e449a23e9d59..1f7020d65d0a 100644
@@ -175,8 +175,8 @@ static int hardlockup_detector_event_create(void)
 	evt = perf_event_create_kernel_counter(wd_attr, cpu, NULL,
 					       watchdog_overflow_callback, NULL);
 	if (IS_ERR(evt)) {
-		pr_info("Perf event create on CPU %d failed with %ld\n", cpu,
-			PTR_ERR(evt));
+		pr_debug("Perf event create on CPU %d failed with %ld\n", cpu,
+			 PTR_ERR(evt));
 		return PTR_ERR(evt);
 	}
 	this_cpu_write(watchdog_ev, evt);