History

block: sum requests in the plug structure

This isn't exactly the same as the previous count, as it includes requests for all devices. But that really doesn't matter, if we have more than the threshold (16) queued up, flush it. It's not worth it to have an expensive list loop for this.

Jens Axboe committed 7 years ago

Commit 5f0ed771 parent af78ff74 files · +10 −39Browse files

Showing the changes to include/linux/blkdev.h (1 of 4 files). Show all

Unified · Split

include/linux/blkdev.h+1−0
@@ -1130,6 +1130,7 @@ extern void blk_set_queue_dying(struct request_queue *); · 1129 unmodified lines
11301130 struct blk_plug {
11311131 struct list_head mq_list; /* blk-mq requests */
11321132 struct list_head cb_list; /* md requires an unplug callback */
1133+ unsigned short rq_count;
11331134 };
11341135 #define BLK_MAX_REQUEST_COUNT 16
11351136 #define BLK_PLUG_FLUSH_SIZE (128 * 1024)