Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Dec 2003 08:46:15 -0800 (PST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 44025 for review
Message-ID:  <200312171646.hBHGkFus047812@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=44025

Change 44025 by jhb@jhb_laptop on 2003/12/17 08:45:32

	A patch I've had on my laptop for ages to enable interrupt
	sources slightly earlier.

Affected files ...

.. //depot/projects/smpng/sys/kern/kern_intr.c#37 edit

Differences ...

==== //depot/projects/smpng/sys/kern/kern_intr.c#37 (text+ko) ====

@@ -546,22 +546,20 @@
 					mtx_unlock(&Giant);
 			}
 		}
+		WITNESS_WARN(WARN_PANIC, NULL, "suspending ithread");
+		mtx_assert(&Giant, MA_NOTOWNED);
 
+		if (ithd->it_enable != NULL)
+			ithd->it_enable(ithd->it_vector);
+
 		/*
 		 * Processed all our interrupts.  Now get the sched
 		 * lock.  This may take a while and it_need may get
 		 * set again, so we have to check it again.
 		 */
-		WITNESS_WARN(WARN_PANIC, NULL, "suspending ithread");
-		mtx_assert(&Giant, MA_NOTOWNED);
 		mtx_lock_spin(&sched_lock);
 		if (!ithd->it_need) {
-			/*
-			 * Should we call this earlier in the loop above?
-			 */
-			if (ithd->it_enable != NULL)
-				ithd->it_enable(ithd->it_vector);
-			TD_SET_IWAIT(td); /* we're idle */
+			TD_SET_IWAIT(td);
 			p->p_stats->p_ru.ru_nvcsw++;
 			CTR2(KTR_INTR, "%s: pid %d: done", __func__, p->p_pid);
 			mi_switch();



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200312171646.hBHGkFus047812>