diff options
author | Tejun Heo <htejun@gmail.com> | 2005-10-20 10:46:54 -0400 |
---|---|---|
committer | Jens Axboe <axboe@nelson.home.kernel.dk> | 2005-10-28 02:45:35 -0400 |
commit | 98b11471d72a374f346bec50a00d0887719b85b3 (patch) | |
tree | 875feb99eacd983fdc9107eb1c3b68f24e641aa4 /drivers/block/deadline-iosched.c | |
parent | 06b86245c052963029bfd9020ca1f08ceb66f85a (diff) |
[PATCH] 04/05 remove last_merge handling from ioscheds
Remove last_merge handling from all ioscheds. This patch
removes merging capability of noop iosched.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'drivers/block/deadline-iosched.c')
-rw-r--r-- | drivers/block/deadline-iosched.c | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/drivers/block/deadline-iosched.c b/drivers/block/deadline-iosched.c index 07de4d24ddba..43d93155efb8 100644 --- a/drivers/block/deadline-iosched.c +++ b/drivers/block/deadline-iosched.c | |||
@@ -112,15 +112,6 @@ static inline void deadline_del_drq_hash(struct deadline_rq *drq) | |||
112 | __deadline_del_drq_hash(drq); | 112 | __deadline_del_drq_hash(drq); |
113 | } | 113 | } |
114 | 114 | ||
115 | static void | ||
116 | deadline_remove_merge_hints(request_queue_t *q, struct deadline_rq *drq) | ||
117 | { | ||
118 | deadline_del_drq_hash(drq); | ||
119 | |||
120 | if (q->last_merge == drq->request) | ||
121 | q->last_merge = NULL; | ||
122 | } | ||
123 | |||
124 | static inline void | 115 | static inline void |
125 | deadline_add_drq_hash(struct deadline_data *dd, struct deadline_rq *drq) | 116 | deadline_add_drq_hash(struct deadline_data *dd, struct deadline_rq *drq) |
126 | { | 117 | { |
@@ -299,12 +290,8 @@ deadline_add_request(struct request_queue *q, struct request *rq) | |||
299 | drq->expires = jiffies + dd->fifo_expire[data_dir]; | 290 | drq->expires = jiffies + dd->fifo_expire[data_dir]; |
300 | list_add_tail(&drq->fifo, &dd->fifo_list[data_dir]); | 291 | list_add_tail(&drq->fifo, &dd->fifo_list[data_dir]); |
301 | 292 | ||
302 | if (rq_mergeable(rq)) { | 293 | if (rq_mergeable(rq)) |
303 | deadline_add_drq_hash(dd, drq); | 294 | deadline_add_drq_hash(dd, drq); |
304 | |||
305 | if (!q->last_merge) | ||
306 | q->last_merge = rq; | ||
307 | } | ||
308 | } | 295 | } |
309 | 296 | ||
310 | /* | 297 | /* |
@@ -316,8 +303,8 @@ static void deadline_remove_request(request_queue_t *q, struct request *rq) | |||
316 | struct deadline_data *dd = q->elevator->elevator_data; | 303 | struct deadline_data *dd = q->elevator->elevator_data; |
317 | 304 | ||
318 | list_del_init(&drq->fifo); | 305 | list_del_init(&drq->fifo); |
319 | deadline_remove_merge_hints(q, drq); | ||
320 | deadline_del_drq_rb(dd, drq); | 306 | deadline_del_drq_rb(dd, drq); |
307 | deadline_del_drq_hash(drq); | ||
321 | } | 308 | } |
322 | 309 | ||
323 | static int | 310 | static int |
@@ -328,15 +315,6 @@ deadline_merge(request_queue_t *q, struct request **req, struct bio *bio) | |||
328 | int ret; | 315 | int ret; |
329 | 316 | ||
330 | /* | 317 | /* |
331 | * try last_merge to avoid going to hash | ||
332 | */ | ||
333 | ret = elv_try_last_merge(q, bio); | ||
334 | if (ret != ELEVATOR_NO_MERGE) { | ||
335 | __rq = q->last_merge; | ||
336 | goto out_insert; | ||
337 | } | ||
338 | |||
339 | /* | ||
340 | * see if the merge hash can satisfy a back merge | 318 | * see if the merge hash can satisfy a back merge |
341 | */ | 319 | */ |
342 | __rq = deadline_find_drq_hash(dd, bio->bi_sector); | 320 | __rq = deadline_find_drq_hash(dd, bio->bi_sector); |
@@ -368,8 +346,6 @@ deadline_merge(request_queue_t *q, struct request **req, struct bio *bio) | |||
368 | 346 | ||
369 | return ELEVATOR_NO_MERGE; | 347 | return ELEVATOR_NO_MERGE; |
370 | out: | 348 | out: |
371 | q->last_merge = __rq; | ||
372 | out_insert: | ||
373 | if (ret) | 349 | if (ret) |
374 | deadline_hot_drq_hash(dd, RQ_DATA(__rq)); | 350 | deadline_hot_drq_hash(dd, RQ_DATA(__rq)); |
375 | *req = __rq; | 351 | *req = __rq; |
@@ -394,8 +370,6 @@ static void deadline_merged_request(request_queue_t *q, struct request *req) | |||
394 | deadline_del_drq_rb(dd, drq); | 370 | deadline_del_drq_rb(dd, drq); |
395 | deadline_add_drq_rb(dd, drq); | 371 | deadline_add_drq_rb(dd, drq); |
396 | } | 372 | } |
397 | |||
398 | q->last_merge = req; | ||
399 | } | 373 | } |
400 | 374 | ||
401 | static void | 375 | static void |