Commit 3e2ea65d authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] CFQ io scheduler

From: Jens Axboe <axboe@suse.de>

CFQ I/O scheduler
parent 1dc841ed
...@@ -27,3 +27,10 @@ config IOSCHED_DEADLINE ...@@ -27,3 +27,10 @@ config IOSCHED_DEADLINE
a disk at any one time, its behaviour is almost identical to the a disk at any one time, its behaviour is almost identical to the
anticipatory I/O scheduler and so is a good choice. anticipatory I/O scheduler and so is a good choice.
config IOSCHED_CFQ
bool "CFQ I/O scheduler" if EMBEDDED
default y
---help---
The CFQ I/O scheduler tries to distribute bandwidth equally
among all processes in the system. It should provide a fair
working environment, suitable for desktop systems.
...@@ -18,6 +18,7 @@ obj-y := elevator.o ll_rw_blk.o ioctl.o genhd.o scsi_ioctl.o ...@@ -18,6 +18,7 @@ obj-y := elevator.o ll_rw_blk.o ioctl.o genhd.o scsi_ioctl.o
obj-$(CONFIG_IOSCHED_NOOP) += noop-iosched.o obj-$(CONFIG_IOSCHED_NOOP) += noop-iosched.o
obj-$(CONFIG_IOSCHED_AS) += as-iosched.o obj-$(CONFIG_IOSCHED_AS) += as-iosched.o
obj-$(CONFIG_IOSCHED_DEADLINE) += deadline-iosched.o obj-$(CONFIG_IOSCHED_DEADLINE) += deadline-iosched.o
obj-$(CONFIG_IOSCHED_CFQ) += cfq-iosched.o
obj-$(CONFIG_MAC_FLOPPY) += swim3.o obj-$(CONFIG_MAC_FLOPPY) += swim3.o
obj-$(CONFIG_BLK_DEV_FD) += floppy.o obj-$(CONFIG_BLK_DEV_FD) += floppy.o
obj-$(CONFIG_BLK_DEV_FD98) += floppy98.o obj-$(CONFIG_BLK_DEV_FD98) += floppy98.o
......
This diff is collapsed.
...@@ -1311,6 +1311,8 @@ static elevator_t *chosen_elevator = ...@@ -1311,6 +1311,8 @@ static elevator_t *chosen_elevator =
&iosched_as; &iosched_as;
#elif defined(CONFIG_IOSCHED_DEADLINE) #elif defined(CONFIG_IOSCHED_DEADLINE)
&iosched_deadline; &iosched_deadline;
#elif defined(CONFIG_IOSCHED_CFQ)
&iosched_cfq;
#elif defined(CONFIG_IOSCHED_NOOP) #elif defined(CONFIG_IOSCHED_NOOP)
&elevator_noop; &elevator_noop;
#else #else
...@@ -1329,6 +1331,10 @@ static int __init elevator_setup(char *str) ...@@ -1329,6 +1331,10 @@ static int __init elevator_setup(char *str)
if (!strcmp(str, "as")) if (!strcmp(str, "as"))
chosen_elevator = &iosched_as; chosen_elevator = &iosched_as;
#endif #endif
#ifdef CONFIG_IOSCHED_CFQ
if (!strcmp(str, "cfq"))
chosen_elevator = &iosched_cfq;
#endif
#ifdef CONFIG_IOSCHED_NOOP #ifdef CONFIG_IOSCHED_NOOP
if (!strcmp(str, "noop")) if (!strcmp(str, "noop"))
chosen_elevator = &elevator_noop; chosen_elevator = &elevator_noop;
......
...@@ -94,6 +94,11 @@ extern elevator_t iosched_deadline; ...@@ -94,6 +94,11 @@ extern elevator_t iosched_deadline;
*/ */
extern elevator_t iosched_as; extern elevator_t iosched_as;
/*
* completely fair queueing I/O scheduler
*/
extern elevator_t iosched_cfq;
extern int elevator_init(request_queue_t *, elevator_t *); extern int elevator_init(request_queue_t *, elevator_t *);
extern void elevator_exit(request_queue_t *); extern void elevator_exit(request_queue_t *);
extern int elv_rq_merge_ok(struct request *, struct bio *); extern int elv_rq_merge_ok(struct request *, struct bio *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment