George Dunlap
2009-Jul-17 12:55 UTC
[Xen-devel] [RFC] [PATCH] One watchdog trips the watchdog on all processors
I''ve been using the watchdog timer recently to debug deadlocks, and found that it only triggers on one cpu. Unfortunately, if your deadlock is not symmetric, it''s not often obvious what the other cpu(s) is(are) doing. The attached patch is a hack I put in place to trigger an NMI on all cpus if it''s triggered on one. This will cause things to hang instead of reboot, however, so I''m not sure how to integrate it into the normal watchdog-for-reliability functionality (as opposed to watchdog-for-debugging). -George _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jan Beulich
2009-Jul-17 13:16 UTC
Re: [Xen-devel] [RFC] [PATCH] One watchdog trips the watchdog on allprocessors
>>> George Dunlap <dunlapg@umich.edu> 17.07.09 14:55 >>> >... >+static void do_nmi_trigger_cpu(int cpu) >+{ >+ u32 id = cpu_physical_id(cpu); >+ >+ printk("Triggering NMI on APIC ID %x\n", id); >+ debugtrace_dump(); >+ >+ local_irq_disable(); >+ apic_wait_icr_idle(); >+ apic_icr_write(APIC_DM_NMI | APIC_DEST_PHYSICAL, id); >+ local_irq_enable();You definitely don''t want to enable interrupts inside an NMI. I don''t think you need to disable them either, as nothing else should have enabled them.>... >+ for_each_cpu(cpu)This is for_each_possible_cpu() now. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel