diff options
-rw-r--r-- | sys/cam/ata/ata_da.c | 10 | ||||
-rw-r--r-- | sys/cam/scsi/scsi_da.c | 10 |
2 files changed, 20 insertions, 0 deletions
diff --git a/sys/cam/ata/ata_da.c b/sys/cam/ata/ata_da.c index ed8eb4d..d924e17 100644 --- a/sys/cam/ata/ata_da.c +++ b/sys/cam/ata/ata_da.c @@ -1797,6 +1797,16 @@ adadone(struct cam_periph *periph, union ccb *done_ccb) TAILQ_INIT(&queue); TAILQ_CONCAT(&queue, &softc->trim_req.bps, bio_queue); + /* + * Normally, the xpt_release_ccb() above would make sure + * that when we have more work to do, that work would + * get kicked off. However, we specifically keep + * trim_running set to 0 before the call above to allow + * other I/O to progress when many BIO_DELETE requests + * are pushed down. We set trim_running to 0 and call + * daschedule again so that we don't stall if there are + * no other I/Os pending apart from BIO_DELETEs. + */ softc->trim_running = 0; adaschedule(periph); cam_periph_unlock(periph); diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index 3266301..ac3093c 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -3048,6 +3048,16 @@ dadone(struct cam_periph *periph, union ccb *done_ccb) TAILQ_INIT(&queue); TAILQ_CONCAT(&queue, &softc->delete_run_queue.queue, bio_queue); softc->delete_run_queue.insert_point = NULL; + /* + * Normally, the xpt_release_ccb() above would make sure + * that when we have more work to do, that work would + * get kicked off. However, we specifically keep + * delete_running set to 0 before the call above to + * allow other I/O to progress when many BIO_DELETE + * requests are pushed down. We set delete_running to 0 + * and call daschedule again so that we don't stall if + * there are no other I/Os pending apart from BIO_DELETEs. + */ softc->delete_running = 0; daschedule(periph); cam_periph_unlock(periph); |