[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4F01D750.7040304@redhat.com>
Date: Mon, 02 Jan 2012 17:12:00 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: Stefan Hajnoczi <stefanha@...il.com>
CC: Minchan Kim <minchan@...nel.org>,
Rusty Russell <rusty@...tcorp.com.au>,
Chris Wright <chrisw@...s-sol.org>,
Jens Axboe <axboe@...nel.dk>,
Stefan Hajnoczi <stefanha@...ux.vnet.ibm.com>,
kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
Christoph Hellwig <hch@...radead.org>,
Vivek Goyal <vgoyal@...hat.com>
Subject: Re: [PATCH 0/6][RFC] virtio-blk: Change I/O path from request to
BIO
On 01/01/2012 05:45 PM, Stefan Hajnoczi wrote:
> By the way, drivers for solid-state devices can set QUEUE_FLAG_NONROT
> to hint that seek time optimizations may be sub-optimal. NBD and
> other virtual/pseudo device drivers set this flag. Should virtio-blk
> set it and how does it affect performance?
By itself is not a good idea in general.
When QEMU uses O_DIRECT, the guest should not use QUEUE_FLAG_NONROT
unless it is active for the host disk as well. (In doubt, as is the
case for remote hosts accessed over NFS, I would also avoid NONROT and
allow more coalescing).
When QEMU doesn't use O_DIRECT, instead, using QUEUE_FLAG_NONROT and
leaving optimizations to the host may make some sense.
In Xen, the back-end driver is bio-based, so the scenario is like QEMU
with O_DIRECT. I remember seeing worse performance when switching the
front-end to either QUEUE_FLAG_NONROT or the noop scheduler. This was
with RHEL5 (2.6.18), but it might still be true in more recent kernels,
modulo benchmarking of course. Still, the current in-tree xen-blkfront
driver does use QUEUE_FLAG_NONROT unconditionally, more precisely its
synonym QUEUE_FLAG_VIRT.
Still, if benchmarking confirms this theory, QEMU could expose a hint
via a feature bit. The default could be simply "use QUEUE_FLAG_NONROT
iff not using O_DIRECT", or it could be more complicated with help from
sysfs.
Paolo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists