Skip to contentSkip to conversation

watchdog: Reduce message verbosity

PATCH Superseded Sinan Kaya 3 participants 6 messages Jul 30, 2018 – Aug 2, 2018

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Sinan Kaya

author
#0 lore raw

PATCH 1/1 watchdog: Reduce message verbosity

Reducing the verbosity level to debug for people that are interested in debugging watchdog issues.

[    0.152492] NMI watchdog: Perf event create on CPU 0 failed with -2
[    0.156002] NMI watchdog: Perf NMI watchdog permanently disabled
---
 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
Quoted 5 lines · Sinan Kaya

Reducing the verbosity level to debug for people that are interested in debugging watchdog issues.

[    0.152492] NMI watchdog: Perf event create on CPU 0 failed with -2
[    0.156002] NMI watchdog: Perf NMI watchdog permanently disabled

Hi Sinan,

Any reason why? Usually when the 'perf event' fails, that indicates a system problem. And most folks don't boot with the 'debug' option. This means these unusual failures are hidden and become difficult to debug later when it propagates.

Or are you running the watchdog in a different configuration such that this is a common nuisance that you are trying to suppress?

Cheers,
Don

Quoted 24 lines
---
 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
author
#2 lore raw

Hi Don,

Quoted 8 lines · Don Zickus
Quoted 2 lines
[    0.152492] NMI watchdog: Perf event create on CPU 0 failed with -2
[    0.156002] NMI watchdog: Perf NMI watchdog permanently disabled

Hi Sinan,

Any reason why? Usually when the 'perf event' fails, that indicates a system problem. And most folks don't boot with the 'debug' option. This means these unusual failures are hidden and become difficult to debug later when it propagates.

Sorry, I should have been more clear. I'm only suppressing the first error message.

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

Second message is still visible during boot. User knows that NMI watchdog is disabled.

[    0.156002] NMI watchdog: Perf NMI watchdog permanently disabled

Code is trying to probe the platform capabilities and is failing because of missing PMU in the system. If someone is interested in finding out why watchdog was disabled, they can turn on the debug message level.

Quoted 3 lines

Or are you running the watchdog in a different configuration such that this is a common nuisance that you are trying to suppress?

Yup, system doesn't support PMU.

Quoted 4 lines

Cheers,
Don

Sinan

Acked-by
#3 lore raw
Quoted 28 lines · Sinan Kaya

Hi Don,

Quoted 8 lines · Don Zickus
Quoted 2 lines
[    0.152492] NMI watchdog: Perf event create on CPU 0 failed with -2
[    0.156002] NMI watchdog: Perf NMI watchdog permanently disabled

Hi Sinan,

Any reason why? Usually when the 'perf event' fails, that indicates a system problem. And most folks don't boot with the 'debug' option. This means these unusual failures are hidden and become difficult to debug later when it propagates.

Sorry, I should have been more clear. I'm only suppressing the first error message.

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

Second message is still visible during boot. User knows that NMI watchdog is disabled.

[    0.156002] NMI watchdog: Perf NMI watchdog permanently disabled

Code is trying to probe the platform capabilities and is failing because of missing PMU in the system. If someone is interested in finding out why watchdog was disabled, they can turn on the debug message level.

Quoted 1 line
Quoted 4 lines
Quoted 2 lines

Or are you running the watchdog in a different configuration such that this is a common nuisance that you are trying to suppress?

Yup, system doesn't support PMU.

Hi Sinan,

Oh, I see. You are just trying to hide the always failing probe. It seems to make sense.

#4 lore raw
In reply to Sinan Kaya
Quoted 5 lines · Sinan Kaya

Reducing the verbosity level to debug for people that are interested in debugging watchdog issues.

[    0.152492] NMI watchdog: Perf event create on CPU 0 failed with -2
[    0.156002] NMI watchdog: Perf NMI watchdog permanently disabled

This changelog is utterly useless.

Thanks,

tglx

author
#5 lore raw
Quoted 9 lines · Thomas Gleixner
Quoted 5 lines · Sinan Kaya

Reducing the verbosity level to debug for people that are interested in debugging watchdog issues.

[    0.152492] NMI watchdog: Perf event create on CPU 0 failed with -2
[    0.156002] NMI watchdog: Perf NMI watchdog permanently disabled

This changelog is utterly useless.

I'll capture my conversation with Don into the commit message and post post V2.

Quoted 5 lines

Thanks,

tglx