]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
xen-blkfront: set queue paravirt flag
authorFernando Luis Vázquez Cao <fernando@oss.ntt.co.jp>
Mon, 27 Oct 2008 09:45:54 +0000 (18:45 +0900)
committerJens Axboe <jens.axboe@oracle.com>
Mon, 29 Dec 2008 07:28:41 +0000 (08:28 +0100)
Xen's blkfront sets noop as the default I/O scheduler at initialization
time to avoid elevator overheads such as idling, but with the advent of
basic disk profiling capabilities this is not necessary anymore. We
should just tell the block layer that we are a paravirt front-end driver
and the elevator will automatically make the necessary adjustments.

Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
drivers/block/xen-blkfront.c

index 2d19f0cc47f272c5ae4f96ee97ea34a1bce5a407..918ef725de41c849f3f78b7e30f80d7709e01a39 100644 (file)
@@ -338,18 +338,12 @@ wait:
 static int xlvbd_init_blk_queue(struct gendisk *gd, u16 sector_size)
 {
        struct request_queue *rq;
-       elevator_t *old_e;
 
        rq = blk_init_queue(do_blkif_request, &blkif_io_lock);
        if (rq == NULL)
                return -1;
 
-       old_e = rq->elevator;
-       if (IS_ERR_VALUE(elevator_init(rq, "noop")))
-               printk(KERN_WARNING
-                       "blkfront: Switch elevator failed, use default\n");
-       else
-               elevator_exit(old_e);
+       queue_flag_set_unlocked(QUEUE_FLAG_VIRT, rq);
 
        /* Hard sector size and max sectors impersonate the equiv. hardware. */
        blk_queue_hardsect_size(rq, sector_size);