diff options
author | Robert Elliott <elliott@hp.com> | 2014-05-21 01:46:26 +0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-05-21 01:49:03 +0400 |
commit | da41a589f52464e24ddefe76814ee35bfb07950c (patch) | |
tree | e3270f36a1a5766e2433b70b0eef4e2205096075 /block/blk-mq.c | |
parent | eba7176826ddab1d04c51bb2d5f2bbf22865444c (diff) | |
download | linux-da41a589f52464e24ddefe76814ee35bfb07950c.tar.xz |
blk-mq: Micro-optimize blk_queue_nomerges() check
In blk_mq_make_request(), do the blk_queue_nomerges() check
outside the call to blk_attempt_plug_merge() to eliminate
function call overhead when nomerges=2 (disabled)
Signed-off-by: Robert Elliott <elliott@hp.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r-- | block/blk-mq.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index fec8fcc4f8a4..ef7ed5e95d6d 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1087,7 +1087,8 @@ static void blk_mq_make_request(struct request_queue *q, struct bio *bio) return; } - if (use_plug && blk_attempt_plug_merge(q, bio, &request_count)) + if (use_plug && !blk_queue_nomerges(q) && + blk_attempt_plug_merge(q, bio, &request_count)) return; if (blk_mq_queue_enter(q)) { |