aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/elevator.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2005-06-27 04:55:12 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-27 17:33:29 -0400
commit22e2c507c301c3dbbcf91b4948b88f78842ee6c9 (patch)
tree9a97c91d1362e69703aa286021daffb8a5456f4c /drivers/block/elevator.c
parent020f46a39eb7b99a575b9f4d105fce2b142acdf1 (diff)
[PATCH] Update cfq io scheduler to time sliced design
This updates the CFQ io scheduler to the new time sliced design (cfq v3). It provides full process fairness, while giving excellent aggregate system throughput even for many competing processes. It supports io priorities, either inherited from the cpu nice value or set directly with the ioprio_get/set syscalls. The latter closely mimic set/getpriority. This import is based on my latest from -mm. Signed-off-by: Jens Axboe <axboe@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/block/elevator.c')
-rw-r--r--drivers/block/elevator.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/block/elevator.c b/drivers/block/elevator.c
index f831f08f839c..98f0126a2deb 100644
--- a/drivers/block/elevator.c
+++ b/drivers/block/elevator.c
@@ -486,12 +486,13 @@ struct request *elv_former_request(request_queue_t *q, struct request *rq)
486 return NULL; 486 return NULL;
487} 487}
488 488
489int elv_set_request(request_queue_t *q, struct request *rq, int gfp_mask) 489int elv_set_request(request_queue_t *q, struct request *rq, struct bio *bio,
490 int gfp_mask)
490{ 491{
491 elevator_t *e = q->elevator; 492 elevator_t *e = q->elevator;
492 493
493 if (e->ops->elevator_set_req_fn) 494 if (e->ops->elevator_set_req_fn)
494 return e->ops->elevator_set_req_fn(q, rq, gfp_mask); 495 return e->ops->elevator_set_req_fn(q, rq, bio, gfp_mask);
495 496
496 rq->elevator_private = NULL; 497 rq->elevator_private = NULL;
497 return 0; 498 return 0;
@@ -505,12 +506,12 @@ void elv_put_request(request_queue_t *q, struct request *rq)
505 e->ops->elevator_put_req_fn(q, rq); 506 e->ops->elevator_put_req_fn(q, rq);
506} 507}
507 508
508int elv_may_queue(request_queue_t *q, int rw) 509int elv_may_queue(request_queue_t *q, int rw, struct bio *bio)
509{ 510{
510 elevator_t *e = q->elevator; 511 elevator_t *e = q->elevator;
511 512
512 if (e->ops->elevator_may_queue_fn) 513 if (e->ops->elevator_may_queue_fn)
513 return e->ops->elevator_may_queue_fn(q, rw); 514 return e->ops->elevator_may_queue_fn(q, rw, bio);
514 515
515 return ELV_MQUEUE_MAY; 516 return ELV_MQUEUE_MAY;
516} 517}