Fix race in interrupt handling that could cause IO to hang up under heavy
load.
This commit is contained in:
parent
d8abe6df98
commit
cc0edb125a
@ -931,10 +931,11 @@ vscsi_check_response_queue(struct vscsi_softc *sc)
|
||||
|
||||
mtx_assert(&sc->io_lock, MA_OWNED);
|
||||
|
||||
phyp_hcall(H_VIO_SIGNAL, sc->unit, 0);
|
||||
bus_dmamap_sync(sc->crq_tag, sc->crq_map, BUS_DMASYNC_POSTREAD);
|
||||
|
||||
while (sc->crq_queue[sc->cur_crq].valid != 0) {
|
||||
/* The hypercalls at both ends of this are not optimal */
|
||||
phyp_hcall(H_VIO_SIGNAL, sc->unit, 0);
|
||||
bus_dmamap_sync(sc->crq_tag, sc->crq_map, BUS_DMASYNC_POSTREAD);
|
||||
|
||||
crq = &sc->crq_queue[sc->cur_crq];
|
||||
|
||||
switch (crq->valid) {
|
||||
@ -983,9 +984,9 @@ vscsi_check_response_queue(struct vscsi_softc *sc)
|
||||
|
||||
crq->valid = 0;
|
||||
sc->cur_crq = (sc->cur_crq + 1) % sc->n_crqs;
|
||||
};
|
||||
|
||||
bus_dmamap_sync(sc->crq_tag, sc->crq_map, BUS_DMASYNC_PREWRITE);
|
||||
phyp_hcall(H_VIO_SIGNAL, sc->unit, 1);
|
||||
bus_dmamap_sync(sc->crq_tag, sc->crq_map, BUS_DMASYNC_PREWRITE);
|
||||
phyp_hcall(H_VIO_SIGNAL, sc->unit, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user