diff options
author | Jens Axboe <axboe@fb.com> | 2014-05-29 11:53:32 -0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-05-29 11:53:32 -0400 |
commit | 05f1dd5315217398fc8d122bdee80f96a9f21274 (patch) | |
tree | f1decfafa5f0d974d2f9c707a514bf68b9e2cddb /include/linux/blkdev.h | |
parent | 4d92a9beb39d80a7d8ff7c04ae12a10290105ae5 (diff) |
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/blkdev.h')
-rw-r--r-- | include/linux/blkdev.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 098304576d51..695b9fd41efe 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -510,6 +510,7 @@ struct request_queue { | |||
510 | #define QUEUE_FLAG_SAME_FORCE 18 /* force complete on same CPU */ | 510 | #define QUEUE_FLAG_SAME_FORCE 18 /* force complete on same CPU */ |
511 | #define QUEUE_FLAG_DEAD 19 /* queue tear-down finished */ | 511 | #define QUEUE_FLAG_DEAD 19 /* queue tear-down finished */ |
512 | #define QUEUE_FLAG_INIT_DONE 20 /* queue is initialized */ | 512 | #define QUEUE_FLAG_INIT_DONE 20 /* queue is initialized */ |
513 | #define QUEUE_FLAG_NO_SG_MERGE 21 /* don't attempt to merge SG segments*/ | ||
513 | 514 | ||
514 | #define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \ | 515 | #define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \ |
515 | (1 << QUEUE_FLAG_STACKABLE) | \ | 516 | (1 << QUEUE_FLAG_STACKABLE) | \ |