From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: [PATCH 4/4] x86/nmi: be less verbose when testing the NMI watchdog Date: Wed, 14 May 2014 13:58:19 +0100 Message-ID: <1400072299-2285-5-git-send-email-david.vrabel@citrix.com> References: <1400072299-2285-1-git-send-email-david.vrabel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WkYlr-0001yP-8T for xen-devel@lists.xenproject.org; Wed, 14 May 2014 12:58:56 +0000 In-Reply-To: <1400072299-2285-1-git-send-email-david.vrabel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Keir Fraser , David Vrabel , Jan Beulich List-Id: xen-devel@lists.xenproject.org There's no need to print all the CPUs that are ok, only the ones that got stuck. The resulting output is either: Testing NMI watchdog on all CPUs: 1 4 6 stuck or Testing NMI watchdog on all CPUs: ok Signed-off-by: David Vrabel --- xen/arch/x86/nmi.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/xen/arch/x86/nmi.c b/xen/arch/x86/nmi.c index 4f330d8..84c1a5e 100644 --- a/xen/arch/x86/nmi.c +++ b/xen/arch/x86/nmi.c @@ -125,11 +125,12 @@ int __init check_nmi_watchdog (void) { static unsigned int __initdata prev_nmi_count[NR_CPUS]; int cpu; - + bool_t ok = 1; + if ( !nmi_watchdog ) return 0; - printk("Testing NMI watchdog --- "); + printk("Testing NMI watchdog on all CPUs:"); for_each_online_cpu ( cpu ) prev_nmi_count[cpu] = nmi_count(cpu); @@ -141,12 +142,13 @@ int __init check_nmi_watchdog (void) for_each_online_cpu ( cpu ) { if ( nmi_count(cpu) - prev_nmi_count[cpu] <= 5 ) - printk("CPU#%d stuck. ", cpu); - else - printk("CPU#%d okay. ", cpu); + { + printk(" %d", cpu); + ok = 0; + } } - printk("\n"); + printk(" %s\n", ok ? "ok" : "stuck"); /* * Now that we know it works we can reduce NMI frequency to -- 1.7.10.4