For messages like NMI watchdog disabled for cpu0: unable to create perf event: -95
KERN_WARNING seems to be more appropriate than KERN_ERR. (Main benefit of the KERN_WARNING level is that Fedora's plymouth bootsplash should now hide them.)
Signed-off-by: Paul Bolle pebolle@tiscali.nl --- Yes, the changed line is getting very long, but that is apparently not a problem in this file.
kernel/watchdog.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/watchdog.c b/kernel/watchdog.c index f37f974..1c2ffe1 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c @@ -363,7 +363,7 @@ static int watchdog_nmi_enable(int cpu) goto out_save; }
- printk(KERN_ERR "NMI watchdog disabled for cpu%i: unable to create perf event: %ld\n", + printk(KERN_WARNING "NMI watchdog disabled for cpu%i: unable to create perf event: %ld\n", cpu, PTR_ERR(event)); return PTR_ERR(event);
On Thu, Feb 03, 2011 at 11:08:10PM +0100, Paul Bolle wrote:
For messages like NMI watchdog disabled for cpu0: unable to create perf event: -95
KERN_WARNING seems to be more appropriate than KERN_ERR. (Main benefit of the KERN_WARNING level is that Fedora's plymouth bootsplash should now hide them.)
Signed-off-by: Paul Bolle pebolle@tiscali.nl
Hi Paul,
Thanks for the patch. I actually maintain this file upstream. I am concerned about the error you are seeing, -95. Is it possible you can provide me a 'dmesg' log of your boot up. I want to see what chipset the perf subsystem thinks it found.
I may want to handle this error a little bit differently than the patch you provided below.
Thanks, Don
Yes, the changed line is getting very long, but that is apparently not a problem in this file.
kernel/watchdog.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/watchdog.c b/kernel/watchdog.c index f37f974..1c2ffe1 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c @@ -363,7 +363,7 @@ static int watchdog_nmi_enable(int cpu) goto out_save; }
- printk(KERN_ERR "NMI watchdog disabled for cpu%i: unable to create perf event: %ld\n",
- printk(KERN_WARNING "NMI watchdog disabled for cpu%i: unable to create perf event: %ld\n", cpu, PTR_ERR(event)); return PTR_ERR(event);
-- 1.7.4
kernel mailing list kernel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/kernel
On Fri, 2011-02-04 at 10:27 -0500, Don Zickus wrote:
I am concerned about the error you are seeing, -95. Is it possible you can provide me a 'dmesg' log of your boot up. I want to see what chipset the perf subsystem thinks it found.
Sure, no problem. Off-list or on-list?
And what messages in dmesg are you interested in? All or just some?
I suppose I should try a boot without the "quiet" kernel parameter. Is there some debug parameter that would be helpful here too?
Paul
On Fri, Feb 04, 2011 at 06:32:33PM +0100, Paul Bolle wrote:
On Fri, 2011-02-04 at 10:27 -0500, Don Zickus wrote:
I am concerned about the error you are seeing, -95. Is it possible you can provide me a 'dmesg' log of your boot up. I want to see what chipset the perf subsystem thinks it found.
Sure, no problem. Off-list or on-list?
on-list is fine.
And what messages in dmesg are you interested in? All or just some?
I suppose I should try a boot without the "quiet" kernel parameter. Is there some debug parameter that would be helpful here too?
you can just run 'dmesg > /tmp/dmesg.out' after you login and then attach that file to a reply to this thread. I'll I am interested in is the few lines above the NMI watchdog error that starts with "Performance Events:" But you can post the whole thing for completeness.
Cheers, Don
On Fri, 2011-02-04 at 13:38 -0500, Don Zickus wrote:
[All] I am interested in is the few lines above the NMI watchdog error that starts with "Performance Events:"
[ 0.016136] Performance Events: [ 0.016139] no APIC, boot with the "lapic" boot parameter to force-enable it [ 0.016142] no hardware sampling interrupt available. [ 0.016146] p6 PMU driver. [ 0.016151] ... version: 0 [ 0.016153] ... bit width: 32 [ 0.016156] ... generic registers: 2 [ 0.016158] ... value mask: 00000000ffffffff [ 0.016161] ... max period: 000000007fffffff [ 0.016163] ... fixed-purpose events: 0 [ 0.016166] ... event mask: 0000000000000003 [ 0.017455] NMI watchdog disabled for cpu0: unable to create perf event: -95
Feel free to ask me for what else might be needed here.
Paul
On Fri, Feb 04, 2011 at 08:42:34PM +0100, Paul Bolle wrote:
On Fri, 2011-02-04 at 13:38 -0500, Don Zickus wrote:
[All] I am interested in is the few lines above the NMI watchdog error that starts with "Performance Events:"
[ 0.016136] Performance Events: [ 0.016139] no APIC, boot with the "lapic" boot parameter to force-enable it [ 0.016142] no hardware sampling interrupt available. [ 0.016146] p6 PMU driver. [ 0.016151] ... version: 0 [ 0.016153] ... bit width: 32 [ 0.016156] ... generic registers: 2 [ 0.016158] ... value mask: 00000000ffffffff [ 0.016161] ... max period: 000000007fffffff [ 0.016163] ... fixed-purpose events: 0 [ 0.016166] ... event mask: 0000000000000003 [ 0.017455] NMI watchdog disabled for cpu0: unable to create perf event: -95
Feel free to ask me for what else might be needed here.
Thanks for the info. This is what I thought, the system has no lapic. I think I am going to re-arrange some code to properly deal with this scenario. Not having a lapic should not be a KERN_ERR, the nmi watchdog should just accept it, print out a quiet message and move on. :-)
Thanks for finding this and providing the info!
Cheers, Don
On Fri, Feb 04, 2011 at 11:32:18PM +0100, Paul Bolle wrote:
On Fri, 2011-02-04 at 17:16 -0500, Don Zickus wrote:
Thanks for finding this and providing the info!
You're welcome. Feel free to ask me to test the rearranged code and/or to a add Reported-by tag to your patch.
Hi Paul,
Here is a patch I was looking to post upstream. This should address your concerns. Let me know how it works out for you.
Cheers, Don
diff --git a/kernel/watchdog.c b/kernel/watchdog.c index d7ebdf4..bb7887b 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c @@ -366,8 +366,17 @@ static int watchdog_nmi_enable(int cpu) goto out_save; }
- printk(KERN_ERR "NMI watchdog disabled for cpu%i: unable to create perf event: %ld\n", - cpu, PTR_ERR(event)); + + /* vary the KERN level based on the returned errno */ + if (PTR_ERR(event) == -EOPNOTSUPP) + printk(KERN_INFO "NMI watchdog disabled (cpu%i): not supported" + " (no LAPIC?)\n", cpu); + else if (PTR_ERR(event) == -ENOENT) + printk(KERN_WARNING "NMI watchdog disabled (cpu%i): hardware" + " events not enabled\n", cpu); + else + printk(KERN_ERR "NMI watchdog disabled (cpu%i): unable to create" + " perf event: %ld\n", cpu, PTR_ERR(event)); return PTR_ERR(event);
/* success path */
On Tue, 2011-02-08 at 16:46 -0500, Don Zickus wrote:
Here is a patch I was looking to post upstream. This should address your concerns. Let me know how it works out for you.
0) Compiles cleanly. 1) Nothing shows up anymore at boot a with Fedora's default command line. 2) dmesg -r | grep NMI <6>[ 0.019692] NMI watchdog disabled (cpu0): not supported (no LAPIC?)
For what testing one of three branches is worth:
Tested-by: Paul Bolle pebolle@tiscali.nl
Thanks,
Paul
On Wed, Feb 09, 2011 at 02:10:49PM +0100, Paul Bolle wrote:
On Tue, 2011-02-08 at 16:46 -0500, Don Zickus wrote:
Here is a patch I was looking to post upstream. This should address your concerns. Let me know how it works out for you.
- Compiles cleanly.
- Nothing shows up anymore at boot a with Fedora's default command
line. 2) dmesg -r | grep NMI <6>[ 0.019692] NMI watchdog disabled (cpu0): not supported (no LAPIC?)
For what testing one of three branches is worth:
Tested-by: Paul Bolle pebolle@tiscali.nl
Thanks!
Cheers, Don
kernel@lists.fedoraproject.org