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
1130struct blk_plug {1130struct blk_plug {
1131 struct list_head mq_list; /* blk-mq requests */1131 struct list_head mq_list; /* blk-mq requests */
1132 struct list_head cb_list; /* md requires an unplug callback */1132 struct list_head cb_list; /* md requires an unplug callback */
1133 unsigned short rq_count;
1133};1134};
1134#define BLK_MAX_REQUEST_COUNT 161135#define BLK_MAX_REQUEST_COUNT 16
1135#define BLK_PLUG_FLUSH_SIZE (128 * 1024)1136#define BLK_PLUG_FLUSH_SIZE (128 * 1024)