0001-Optimize-isr-routine-from-FreeBSD-proved-to-work.patch

masterblaster, 06/23/2011 06:19 PM

Download (1.32 KB)

View differences:

sys/bus/cam/cam_xpt.c
7234 7234

  
7235 7235
	spin_lock(&cam_simq_spin);
7236 7236
	TAILQ_INIT(&queue);
7237
	TAILQ_CONCAT(&queue, &cam_simq, links);
7238
	spin_unlock(&cam_simq_spin);
7239 7237

  
7240
	while ((sim = TAILQ_FIRST(&queue)) != NULL) {
7241
		TAILQ_REMOVE(&queue, sim, links);
7242
		CAM_SIM_LOCK(sim);
7243
		sim->flags &= ~CAM_SIM_ON_DONEQ;
7244
		camisr_runqueue(sim);
7245
		CAM_SIM_UNLOCK(sim);
7246
	}
7238
    while (!TAILQ_EMPTY(&cam_simq)) {
7239
        TAILQ_CONCAT(&queue, &cam_simq, links);
7240
        spin_unlock(&cam_simq_spin);
7241

  
7242
        while ((sim = TAILQ_FIRST(&queue)) != NULL) {
7243
            TAILQ_REMOVE(&queue, sim, links);
7244
            CAM_SIM_LOCK(sim);
7245
            sim->flags &= ~CAM_SIM_ON_DONEQ;
7246
            camisr_runqueue(sim);
7247
            CAM_SIM_UNLOCK(sim);
7248
        }
7249
        spin_lock(&cam_simq_spin);
7250
    }
7251
    spin_unlock(&cam_simq_spin);
7247 7252
}
7248 7253

  
7249 7254
static void
7250
-