diff options
author | scottl <scottl@FreeBSD.org> | 2007-11-21 04:03:51 +0000 |
---|---|---|
committer | scottl <scottl@FreeBSD.org> | 2007-11-21 04:03:51 +0000 |
commit | b607c8d8ad8a9a7639a87f1bc13821a2294feffa (patch) | |
tree | 1c728d282e4c2d3e4989c71f176b996bc9fbb90d /sys/ia64 | |
parent | db332cba551507129323c839351afcb5f28060d5 (diff) | |
download | FreeBSD-src-b607c8d8ad8a9a7639a87f1bc13821a2294feffa.zip FreeBSD-src-b607c8d8ad8a9a7639a87f1bc13821a2294feffa.tar.gz |
Extend critical section coverage in the low-level interrupt handlers to
include the ithread scheduling step. Without this, a preemption might
occur in between the interrupt getting masked and the ithread getting
scheduled. Since the interrupt handler runs in the context of curthread,
the scheudler might see it as having a such a low priority on a busy system
that it doesn't get to run for a _long_ time, leaving the interrupt stranded
in a disabled state. The only way that the preemption can happen is by
a fast/filter handler triggering a schduling event earlier in the handler,
so this problem can only happen for cases where an interrupt is being
shared by both a fast/filter handler and an ithread handler. Unfortunately,
it seems to be common for this sharing to happen with network and USB
devices, for example. This fixes many of the mysterious TCP session
timeouts and NIC watchdogs that were being reported. Many thanks to Sam
Lefler for getting to the bottom of this problem.
Reviewed by: jhb, jeff, silby
Diffstat (limited to 'sys/ia64')
-rw-r--r-- | sys/ia64/ia64/interrupt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/ia64/ia64/interrupt.c b/sys/ia64/ia64/interrupt.c index 5460c59..5d30566 100644 --- a/sys/ia64/ia64/interrupt.c +++ b/sys/ia64/ia64/interrupt.c @@ -441,7 +441,6 @@ ia64_dispatch_intr(void *frame, u_int vector) thread = 1; } } - critical_exit(); if (thread) { ia64_intr_mask((void *)(uintptr_t)vector); @@ -449,6 +448,7 @@ ia64_dispatch_intr(void *frame, u_int vector) KASSERT(error == 0, ("%s: impossible stray", __func__)); } else ia64_intr_eoi((void *)(uintptr_t)vector); + critical_exit(); #endif } |