Project

General

Profile

Bug #2092 » 0001-Optimize-isr-routine-from-FreeBSD-proved-to-work.patch

masterblaster, 06/23/2011 06:19 PM

View differences:

sys/bus/cam/cam_xpt.c
spin_lock(&cam_simq_spin);
TAILQ_INIT(&queue);
TAILQ_CONCAT(&queue, &cam_simq, links);
spin_unlock(&cam_simq_spin);
while ((sim = TAILQ_FIRST(&queue)) != NULL) {
TAILQ_REMOVE(&queue, sim, links);
CAM_SIM_LOCK(sim);
sim->flags &= ~CAM_SIM_ON_DONEQ;
camisr_runqueue(sim);
CAM_SIM_UNLOCK(sim);
}
while (!TAILQ_EMPTY(&cam_simq)) {
TAILQ_CONCAT(&queue, &cam_simq, links);
spin_unlock(&cam_simq_spin);
while ((sim = TAILQ_FIRST(&queue)) != NULL) {
TAILQ_REMOVE(&queue, sim, links);
CAM_SIM_LOCK(sim);
sim->flags &= ~CAM_SIM_ON_DONEQ;
camisr_runqueue(sim);
CAM_SIM_UNLOCK(sim);
}
spin_lock(&cam_simq_spin);
}
spin_unlock(&cam_simq_spin);
}
static void
(1-1/3)