summaryrefslogtreecommitdiffstats
path: root/include/linux/blkdev.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2018-11-24 00:04:33 -0500
committerJens Axboe <axboe@kernel.dk>2018-11-26 12:35:22 -0500
commit5f0ed774ed2914decfd397569fface997532e94d (patch)
tree726b690fbf0f0c4cf67f6fcad5266cbe076997ba /include/linux/blkdev.h
parentaf78ff7c6e66832afcdf5418f67b11c409f9e7a1 (diff)
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. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r--include/linux/blkdev.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index e3c0a8ec16a7..02732cae6080 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1130,6 +1130,7 @@ extern void blk_set_queue_dying(struct request_queue *);
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 16 1135#define BLK_MAX_REQUEST_COUNT 16
1135#define BLK_PLUG_FLUSH_SIZE (128 * 1024) 1136#define BLK_PLUG_FLUSH_SIZE (128 * 1024)