Gitweb:
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=48f15b93b2c9f4ec9b8af08ab78f7a27db7c8378
Commit: 48f15b93b2c9f4ec9b8af08ab78f7a27db7c8378
Parent: 2f56debd77a8f52f1ac1d3c3d89cc7ce5e083230
Author: Paul Clements <[EMAIL PROTECTED]>
AuthorDate: Sat Feb 23 15:23:50 2008 -0800
Committer: Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Sat Feb 23 17:12:15 2008 -0800
NBD: make nbd default to deadline I/O scheduler
NBD doesn't work well with CFQ (or AS) schedulers, so let's default to
something else.
The two problems I have experienced with nbd and cfq are:
1) nbd hangs with cfq on RHEL 5 (2.6.18) -- this may well have been
fixed
There's a similar debian bug that has been filed as well:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=447638
There have been posts to nbd-general mailing list about problems with
cfq and nbd also.
2) nbd performs about 10% better (the last time I tested) with deadline
vs. cfq (the overhead of cfq doesn't provide much advantage to nbd [not
being a real disk], and you end up going through the I/O scheduler on
the nbd server anyway, so it makes sense that deadline is better with
nbd)
Signed-off-by: Paul Clements <[EMAIL PROTECTED]>
Cc: Jens Axboe <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
drivers/block/nbd.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index 018753c..b53fdb0 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -655,6 +655,7 @@ static int __init nbd_init(void)
for (i = 0; i < nbds_max; i++) {
struct gendisk *disk = alloc_disk(1);
+ elevator_t *old_e;
if (!disk)
goto out;
nbd_dev[i].disk = disk;
@@ -668,6 +669,11 @@ static int __init nbd_init(void)
put_disk(disk);
goto out;
}
+ old_e = disk->queue->elevator;
+ if (elevator_init(disk->queue, "deadline") == 0 ||
+ elevator_init(disk->queue, "noop") == 0) {
+ elevator_exit(old_e);
+ }
}
if (register_blkdev(NBD_MAJOR, "nbd")) {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html