-
- Downloads
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>
Showing
- block/blk-core.c 1 addition, 1 deletionblock/blk-core.c
- block/blk-merge.c 6 additions, 0 deletionsblock/blk-merge.c
- block/blk.h 2 additions, 0 deletionsblock/blk.h
- block/elevator.c 49 additions, 3 deletionsblock/elevator.c
- include/linux/elevator.h 1 addition, 0 deletionsinclude/linux/elevator.h
Loading
Please register or sign in to comment