aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/blk-mq.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2014-05-29 09:53:32 -0600
committerJens Axboe <axboe@fb.com>2014-05-29 09:53:32 -0600
commit05f1dd5315217398fc8d122bdee80f96a9f21274 (patch)
treef1decfafa5f0d974d2f9c707a514bf68b9e2cddb /include/linux/blk-mq.h
parentblock: remove 'magic' from struct blk_plug (diff)
downloadlinux-dev-05f1dd5315217398fc8d122bdee80f96a9f21274.tar.xz
linux-dev-05f1dd5315217398fc8d122bdee80f96a9f21274.zip
block: add queue flag for disabling SG merging
If devices are not SG starved, we waste a lot of time potentially collapsing SG segments. Enough that 1.5% of the CPU time goes to this, at only 400K IOPS. Add a queue flag, QUEUE_FLAG_NO_SG_MERGE, which just returns the number of vectors in a bio instead of looping over all segments and checking for collapsible ones. Add a BLK_MQ_F_SG_MERGE flag so that drivers can opt-in on the sg merging, if they so desire. Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include/linux/blk-mq.h')
-rw-r--r--include/linux/blk-mq.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h
index 91dfb75ce39f..95de239444d2 100644
--- a/include/linux/blk-mq.h
+++ b/include/linux/blk-mq.h
@@ -129,6 +129,7 @@ enum {
BLK_MQ_F_SHOULD_MERGE = 1 << 0,
BLK_MQ_F_SHOULD_SORT = 1 << 1,
BLK_MQ_F_TAG_SHARED = 1 << 2,
+ BLK_MQ_F_SG_MERGE = 1 << 3,
BLK_MQ_S_STOPPED = 0,
BLK_MQ_S_TAG_ACTIVE = 1,