public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] - Avoid kernel hang during CMC interrupt storm
@ 2005-10-05 17:02 Bryan Sutula
  2005-10-06  0:30 ` Keith Owens
  0 siblings, 1 reply; 2+ messages in thread
From: Bryan Sutula @ 2005-10-05 17:02 UTC (permalink / raw)
  To: linux-ia64

I've noticed a kernel hang during a storm of CMC interrupts, which was
tracked down to the continual execution of the interrupt handler.

There's code in the CMC handler that's supposed to disable CMC
interrupts and switch to polling mode when it sees a bunch of CMCs.
Because disabling CMCs across all CPUs isn't safe in interrupt context,
the disable is done with a schedule_work().  But with continual CMC
interrupts, the schedule_work() never gets executed.

The following patch immediately disables CMC interrupts for the current
CPU.  This then allows (at least) one CPU to ignore CMC interrupts,
execute the schedule_work() code, and disable CMC interrupts on the rest
of the CPUs.

Signed-off-by: Bryan Sutula <Bryan.Sutula@hp.com>


--- linux-2.6.14-rc3-git5/arch/ia64/kernel/mca.c
+++ linux-2.6.14-rc3-git5_new/arch/ia64/kernel/mca.c
@@ -1016,6 +1016,11 @@ ia64_mca_cmc_int_handler(int cmc_irq, vo
 
 			cmc_polling_enabled = 1;
 			spin_unlock(&cmc_history_lock);
+			/* If we're being hit with CMC interrupts, we won't
+			 * ever execute the schedule_work() below.  Need to
+			 * disable CMC interrupts on this processor now.
+			 */
+			ia64_mca_cmc_vector_disable(NULL);
 			schedule_work(&cmc_disable_work);
 
 			/*


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] - Avoid kernel hang during CMC interrupt storm
  2005-10-05 17:02 [PATCH] - Avoid kernel hang during CMC interrupt storm Bryan Sutula
@ 2005-10-06  0:30 ` Keith Owens
  0 siblings, 0 replies; 2+ messages in thread
From: Keith Owens @ 2005-10-06  0:30 UTC (permalink / raw)
  To: linux-ia64

On Wed, 05 Oct 2005 11:02:06 -0600, 
Bryan Sutula <Bryan.Sutula@hp.com> wrote:
>The following patch immediately disables CMC interrupts for the current
>CPU.  This then allows (at least) one CPU to ignore CMC interrupts,
>execute the schedule_work() code, and disable CMC interrupts on the rest
>of the CPUs.

Ack-by: Keith Owens <kaos@sgi.com>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-10-06  0:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-05 17:02 [PATCH] - Avoid kernel hang during CMC interrupt storm Bryan Sutula
2005-10-06  0:30 ` Keith Owens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox