aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJens Axboe <jaxboe@fusionio.com>2011-03-21 05:14:27 -0400
committerJens Axboe <jaxboe@fusionio.com>2011-03-21 05:14:27 -0400
commit5e84ea3a9c662dc2d7a48703a4468fad954a3b7f (patch)
tree3fa0fb26a7c8a970213584104cc2498ef46d60a3 /include
parent4345caba340f051e10847924fc078ae18ed6695c (diff)
block: attempt to merge with existing requests on plug flush
One of the disadvantages of on-stack plugging is that we potentially lose out on merging since all pending IO isn't always visible to everybody. When we flush the on-stack plugs, right now we don't do any checks to see if potential merge candidates could be utilized. Correct this by adding a new insert variant, ELEVATOR_INSERT_SORT_MERGE. It works just ELEVATOR_INSERT_SORT, but first checks whether we can merge with an existing request before doing the insertion (if we fail merging). This fixes a regression with multiple processes issuing IO that can be merged. Thanks to Shaohua Li <shaohua.li@intel.com> for testing and fixing an accounting bug. Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/elevator.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/elevator.h b/include/linux/elevator.h
index ec6f72b84477..d93efcc44570 100644
--- a/include/linux/elevator.h
+++ b/include/linux/elevator.h
@@ -166,6 +166,7 @@ extern struct request *elv_rb_find(struct rb_root *, sector_t);
166#define ELEVATOR_INSERT_SORT 3 166#define ELEVATOR_INSERT_SORT 3
167#define ELEVATOR_INSERT_REQUEUE 4 167#define ELEVATOR_INSERT_REQUEUE 4
168#define ELEVATOR_INSERT_FLUSH 5 168#define ELEVATOR_INSERT_FLUSH 5
169#define ELEVATOR_INSERT_SORT_MERGE 6
169 170
170/* 171/*
171 * return values from elevator_may_queue_fn 172 * return values from elevator_may_queue_fn