Skip to content

Commit

Permalink
xen-blkfront: set queue paravirt flag
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Fernando Luis Vázquez Cao authored and Jens Axboe committed Dec 29, 2008
1 parent 7d116b6 commit 66d352e
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions drivers/block/xen-blkfront.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,18 +338,12 @@ static void do_blkif_request(struct request_queue *rq)
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);
Expand Down

0 comments on commit 66d352e

Please sign in to comment.