Changeset View
Changeset View
Standalone View
Standalone View
head/sys/cam/cam_iosched.c
Show First 20 Lines • Show All 1,339 Lines • ▼ Show 20 Lines | cam_iosched_queue_work(struct cam_iosched_softc *isc, struct bio *bp) | ||||
if (bp->bio_cmd == BIO_DELETE) { | if (bp->bio_cmd == BIO_DELETE) { | ||||
bioq_disksort(&isc->trim_queue, bp); | bioq_disksort(&isc->trim_queue, bp); | ||||
#ifdef CAM_IOSCHED_DYNAMIC | #ifdef CAM_IOSCHED_DYNAMIC | ||||
isc->trim_stats.in++; | isc->trim_stats.in++; | ||||
isc->trim_stats.queued++; | isc->trim_stats.queued++; | ||||
#endif | #endif | ||||
} | } | ||||
#ifdef CAM_IOSCHED_DYNAMIC | #ifdef CAM_IOSCHED_DYNAMIC | ||||
else if (do_dynamic_iosched && | else if (do_dynamic_iosched && (bp->bio_cmd != BIO_READ)) { | ||||
(bp->bio_cmd == BIO_WRITE || bp->bio_cmd == BIO_FLUSH)) { | |||||
if (cam_iosched_sort_queue(isc)) | if (cam_iosched_sort_queue(isc)) | ||||
bioq_disksort(&isc->write_queue, bp); | bioq_disksort(&isc->write_queue, bp); | ||||
else | else | ||||
bioq_insert_tail(&isc->write_queue, bp); | bioq_insert_tail(&isc->write_queue, bp); | ||||
if (iosched_debug > 9) | if (iosched_debug > 9) | ||||
printf("Qw : %p %#x\n", bp, bp->bio_cmd); | printf("Qw : %p %#x\n", bp, bp->bio_cmd); | ||||
if (bp->bio_cmd == BIO_WRITE) { | if (bp->bio_cmd == BIO_WRITE) { | ||||
isc->write_stats.in++; | isc->write_stats.in++; | ||||
▲ Show 20 Lines • Show All 342 Lines • Show Last 20 Lines |