]> git.baikalelectronics.ru Git - kernel.git/commit
block: add queue flag for disabling SG merging
authorJens Axboe <axboe@fb.com>
Thu, 29 May 2014 15:53:32 +0000 (09:53 -0600)
committerJens Axboe <axboe@fb.com>
Thu, 29 May 2014 15:53:32 +0000 (09:53 -0600)
commit1a447054b40c62cf85b840f7ad93a56bec1d7f52
treef1decfafa5f0d974d2f9c707a514bf68b9e2cddb
parent488771b9e08f80b1cc932ea7bf09462b36bfb297
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>
block/blk-merge.c
block/blk-mq.c
include/linux/blk-mq.h
include/linux/blkdev.h