PERFORCE change 170157 for review
Alexander Motin
mav at FreeBSD.org
Wed Nov 4 12:11:02 UTC 2009
http://p4web.freebsd.org/chv.cgi?CH=170157
Change 170157 by mav at mav_mavtest on 2009/11/04 12:10:45
If several controllers complete requests same time, call swi_sched()
only once.
Affected files ...
.. //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#120 edit
Differences ...
==== //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#120 (text+ko) ====
@@ -4238,6 +4238,7 @@
xpt_done(union ccb *done_ccb)
{
struct cam_sim *sim;
+ int first;
CAM_DEBUG(done_ccb->ccb_h.path, CAM_DEBUG_TRACE, ("xpt_done\n"));
if ((done_ccb->ccb_h.func_code & XPT_FC_QUEUED) != 0) {
@@ -4251,10 +4252,12 @@
done_ccb->ccb_h.pinfo.index = CAM_DONEQ_INDEX;
if ((sim->flags & CAM_SIM_ON_DONEQ) == 0) {
mtx_lock(&cam_simq_lock);
+ first = TAILQ_EMPTY(&cam_simq);
TAILQ_INSERT_TAIL(&cam_simq, sim, links);
mtx_unlock(&cam_simq_lock);
sim->flags |= CAM_SIM_ON_DONEQ;
- swi_sched(cambio_ih, 0);
+ if (first)
+ swi_sched(cambio_ih, 0);
}
}
}
More information about the p4-projects
mailing list