Skip to content

Commit 66d352e

Browse files
Fernando Luis Vázquez CaoJens Axboe
authored andcommitted
xen-blkfront: set queue paravirt flag
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>
1 parent 7d116b6 commit 66d352e

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

‎drivers/block/xen-blkfront.c‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -338,18 +338,12 @@ static void do_blkif_request(struct request_queue *rq)
338338
static int xlvbd_init_blk_queue(struct gendisk *gd, u16 sector_size)
339339
{
340340
struct request_queue *rq;
341-
elevator_t *old_e;
342341

343342
rq = blk_init_queue(do_blkif_request, &blkif_io_lock);
344343
if (rq == NULL)
345344
return -1;
346345

347-
old_e = rq->elevator;
348-
if (IS_ERR_VALUE(elevator_init(rq, "noop")))
349-
printk(KERN_WARNING
350-
"blkfront: Switch elevator failed, use default\n");
351-
else
352-
elevator_exit(old_e);
346+
queue_flag_set_unlocked(QUEUE_FLAG_VIRT, rq);
353347

354348
/* Hard sector size and max sectors impersonate the equiv. hardware. */
355349
blk_queue_hardsect_size(rq, sector_size);

0 commit comments

Comments
 (0)