aboutsummaryrefslogtreecommitdiffstats
path: root/block/elevator.c
diff options
context:
space:
mode:
authorAlan D. Brunelle <Alan.Brunelle@hp.com>2008-04-29 08:44:19 -0400
committerJens Axboe <jens.axboe@oracle.com>2008-04-29 08:48:55 -0400
commitac9fafa1243640349aa481adf473db283a695766 (patch)
tree155c2371cca8971638d781269f39fa015bc6509c /block/elevator.c
parentd7e3c3249ef23b4617393c69fe464765b4ff1645 (diff)
block: Skip I/O merges when disabled
The block I/O + elevator + I/O scheduler code spend a lot of time trying to merge I/Os -- rightfully so under "normal" circumstances. However, if one were to know that the incoming I/O stream was /very/ random in nature, the cycles are wasted. This patch adds a per-request_queue tunable that (when set) disables merge attempts (beyond the simple one-hit cache check), thus freeing up a non-trivial amount of CPU cycles. Signed-off-by: Alan D. Brunelle <alan.brunelle@hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/elevator.c')
-rw-r--r--block/elevator.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/block/elevator.c b/block/elevator.c
index 7253fa05db0a..ac5310ef8270 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -488,6 +488,9 @@ int elv_merge(struct request_queue *q, struct request **req, struct bio *bio)
488 } 488 }
489 } 489 }
490 490
491 if (blk_queue_nomerges(q))
492 return ELEVATOR_NO_MERGE;
493
491 /* 494 /*
492 * See if our hash lookup can find a potential backmerge. 495 * See if our hash lookup can find a potential backmerge.
493 */ 496 */