From: Paolo Bonzini <pbonzini@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Minchan Kim <minchan@kernel.org>,
Rusty Russell <rusty@rustcorp.com.au>,
Chris Wright <chrisw@sous-sol.org>, Jens Axboe <axboe@kernel.dk>,
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
Christoph Hellwig <hch@infradead.org>,
Vivek Goyal <vgoyal@redhat.com>
Subject: Re: [PATCH 0/6][RFC] virtio-blk: Change I/O path from request to BIO
Date: Mon, 02 Jan 2012 17:12:00 +0100 [thread overview]
Message-ID: <4F01D750.7040304@redhat.com> (raw)
In-Reply-To: <CAJSP0QWpzOGtQEULu7yz1vDEExSatGpdEPSvvDx=oNYkBveyrQ@mail.gmail.com>
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
next prev parent reply other threads:[~2012-01-02 16:12 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-21 1:00 [PATCH 0/6][RFC] virtio-blk: Change I/O path from request to BIO Minchan Kim
2011-12-21 1:00 ` [PATCH 1/6] block: add bio_map_sg Minchan Kim
2011-12-21 1:00 ` [PATCH 2/6] virtio: support unlocked queue kick Minchan Kim
2011-12-21 1:00 ` [PATCH 3/6] virtio-blk: remove the unused list of pending requests Minchan Kim
2011-12-21 1:00 ` [PATCH 4/6] virtio-blk: implement ->make_request Minchan Kim
2011-12-22 12:20 ` Stefan Hajnoczi
2011-12-22 20:28 ` Christoph Hellwig
2011-12-21 1:00 ` [PATCH 5/6] virtio-blk: Support batch I/O for enhancing sequential IO Minchan Kim
2011-12-21 1:00 ` [PATCH 6/6] virtio-blk: Emulate Flush/FUA Minchan Kim
2011-12-21 5:08 ` [PATCH 0/6][RFC] virtio-blk: Change I/O path from request to BIO Rusty Russell
2011-12-21 5:56 ` Minchan Kim
2011-12-21 8:28 ` Sasha Levin
2011-12-21 8:17 ` Minchan Kim
2011-12-21 19:11 ` Vivek Goyal
2011-12-22 1:05 ` Minchan Kim
2011-12-22 15:45 ` Vivek Goyal
2011-12-22 23:26 ` Minchan Kim
2011-12-22 12:57 ` Stefan Hajnoczi
2011-12-22 23:41 ` Minchan Kim
2012-01-01 16:45 ` Stefan Hajnoczi
2012-01-02 7:48 ` Dor Laor
2012-01-02 16:12 ` Paolo Bonzini [this message]
2012-01-02 16:15 ` Christoph Hellwig
2012-01-02 16:18 ` Paolo Bonzini
2012-01-02 16:23 ` Christoph Hellwig
2012-01-02 16:18 ` Christoph Hellwig
2012-01-02 16:21 ` Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F01D750.7040304@redhat.com \
--to=pbonzini@redhat.com \
--cc=axboe@kernel.dk \
--cc=chrisw@sous-sol.org \
--cc=hch@infradead.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=minchan@kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=stefanha@gmail.com \
--cc=stefanha@linux.vnet.ibm.com \
--cc=vgoyal@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).