diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2006-12-20 05:04:12 -0500 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2006-12-20 05:04:12 -0500 |
commit | da775265021b61d5eb81df155e36cb0810f6df53 (patch) | |
tree | f7b28991b281a8c581bd3ab0bb470e158ae2206f /include/linux | |
parent | 8e5cfc45e7527eb5c8a9a22d56a7b9227e7c0913 (diff) |
[PATCH] cfq-iosched: don't allow sync merges across queues
Currently we allow any merge, even if the io originates from different
processes. This can cause really bad starvation and unfairness, if those
ios happen to be synchronous (reads or direct writes).
So add a allow_merge hook to the io scheduler ops, so an io scheduler can
help decide whether a bio/process combination may be merged with an
existing request.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/elevator.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/elevator.h b/include/linux/elevator.h index a24931d24404..e88fcbc77f8f 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h | |||
@@ -12,6 +12,8 @@ typedef void (elevator_merge_req_fn) (request_queue_t *, struct request *, struc | |||
12 | 12 | ||
13 | typedef void (elevator_merged_fn) (request_queue_t *, struct request *, int); | 13 | typedef void (elevator_merged_fn) (request_queue_t *, struct request *, int); |
14 | 14 | ||
15 | typedef int (elevator_allow_merge_fn) (request_queue_t *, struct request *, struct bio *); | ||
16 | |||
15 | typedef int (elevator_dispatch_fn) (request_queue_t *, int); | 17 | typedef int (elevator_dispatch_fn) (request_queue_t *, int); |
16 | 18 | ||
17 | typedef void (elevator_add_req_fn) (request_queue_t *, struct request *); | 19 | typedef void (elevator_add_req_fn) (request_queue_t *, struct request *); |
@@ -33,6 +35,7 @@ struct elevator_ops | |||
33 | elevator_merge_fn *elevator_merge_fn; | 35 | elevator_merge_fn *elevator_merge_fn; |
34 | elevator_merged_fn *elevator_merged_fn; | 36 | elevator_merged_fn *elevator_merged_fn; |
35 | elevator_merge_req_fn *elevator_merge_req_fn; | 37 | elevator_merge_req_fn *elevator_merge_req_fn; |
38 | elevator_allow_merge_fn *elevator_allow_merge_fn; | ||
36 | 39 | ||
37 | elevator_dispatch_fn *elevator_dispatch_fn; | 40 | elevator_dispatch_fn *elevator_dispatch_fn; |
38 | elevator_add_req_fn *elevator_add_req_fn; | 41 | elevator_add_req_fn *elevator_add_req_fn; |