fast intr: Don't dispatch to the BGL owner, if BGL could not be holden;
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Wed, 8 Jul 2009 03:29:44 +0000 (11:29 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sat, 11 Jul 2009 02:27:13 +0000 (10:27 +0800)
just reschedule ithread.

Discussed-with: dillon@

sys/kern/kern_intr.c

index 97bccb5..fd67df4 100644 (file)
@@ -635,23 +635,8 @@ ithread_fast_handler(struct intrframe *frame)
 #ifdef SMP
            if ((rec->intr_flags & INTR_MPSAFE) == 0 && got_mplock == 0) {
                if (try_mplock() == 0) {
-                   int owner;
-
-                   /*
-                    * If we couldn't get the MP lock try to forward it
-                    * to the cpu holding the MP lock, setting must_schedule
-                    * to -1 so we do not schedule and also do not unmask
-                    * the interrupt.  Otherwise just schedule it.
-                    */
-                   owner = owner_mplock();
-                   if (owner >= 0 && owner != gd->gd_cpuid) {
-                       lwkt_send_ipiq_bycpu(owner, forward_fastint_remote,
-                                               (void *)intr);
-                       must_schedule = -1;
-                       ++gd->gd_cnt.v_forwarded_ints;
-                   } else {
-                       must_schedule = 1;
-                   }
+                   /* Couldn't get the MP lock; just schedule it. */
+                   must_schedule = 1;
                    break;
                }
                got_mplock = 1;