* cache write back & barriers
@ 2013-06-12 8:03 folkert
2013-06-13 8:26 ` Stefan Hajnoczi
2013-06-13 14:40 ` Alexandre DERUMIER
0 siblings, 2 replies; 6+ messages in thread
From: folkert @ 2013-06-12 8:03 UTC (permalink / raw)
To: kvm
Hi,
In virt-manager I saw that there's the option for cache writeback for
storage devices.
I'm wondering: does this also make kvm to ignore write barriers invoked
by the virtual machine?
regards,
Folkert van Heusden
--
Always wondered what the latency of your webserver is? Or how much more
latency you get when you go through a proxy server/tor? The numbers
tell the tale and with HTTPing you know them!
http://www.vanheusden.com/httping/
-----------------------------------------------------------------------
Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: cache write back & barriers
2013-06-12 8:03 cache write back & barriers folkert
@ 2013-06-13 8:26 ` Stefan Hajnoczi
2013-06-13 8:47 ` folkert
2013-06-13 14:40 ` Alexandre DERUMIER
1 sibling, 1 reply; 6+ messages in thread
From: Stefan Hajnoczi @ 2013-06-13 8:26 UTC (permalink / raw)
To: folkert; +Cc: kvm
On Wed, Jun 12, 2013 at 10:03:10AM +0200, folkert wrote:
> In virt-manager I saw that there's the option for cache writeback for
> storage devices.
> I'm wondering: does this also make kvm to ignore write barriers invoked
> by the virtual machine?
No, that would be unsafe. When the guest issues a flush then QEMU will
ensure that data reaches the disk with -drive cache=writeback.
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: cache write back & barriers
2013-06-13 8:26 ` Stefan Hajnoczi
@ 2013-06-13 8:47 ` folkert
2013-06-14 10:53 ` Stefan Hajnoczi
0 siblings, 1 reply; 6+ messages in thread
From: folkert @ 2013-06-13 8:47 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: kvm
Hi,
> > In virt-manager I saw that there's the option for cache writeback for
> > storage devices.
> > I'm wondering: does this also make kvm to ignore write barriers invoked
> > by the virtual machine?
>
> No, that would be unsafe. When the guest issues a flush then QEMU will
> ensure that data reaches the disk with -drive cache=writeback.
Aha so the writeback behaves like the consume harddisks with write-cache
on them.
In that case maybe an extra note could be added to the virt-manager
(excellent software by the way!) that if the client vm supports
barriers, that write-back in that case then is safe. Agree?
Folkert van Heusden
--
Ever wonder what is out there? Any alien races? Then please support
the seti@home project: setiathome.ssl.berkeley.edu
----------------------------------------------------------------------
Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: cache write back & barriers
2013-06-12 8:03 cache write back & barriers folkert
2013-06-13 8:26 ` Stefan Hajnoczi
@ 2013-06-13 14:40 ` Alexandre DERUMIER
1 sibling, 0 replies; 6+ messages in thread
From: Alexandre DERUMIER @ 2013-06-13 14:40 UTC (permalink / raw)
To: folkert; +Cc: kvm
>>I'm wondering: does this also make kvm to ignore write barriers invoked
>>by the virtual machine?
no, cache=writeback is ok, write barriers are working correctly
only with cache=unsafe,it doesn't care about write flush.
----- Mail original -----
De: "folkert" <folkert@vanheusden.com>
À: kvm@vger.kernel.org
Envoyé: Mercredi 12 Juin 2013 10:03:10
Objet: cache write back & barriers
Hi,
In virt-manager I saw that there's the option for cache writeback for
storage devices.
I'm wondering: does this also make kvm to ignore write barriers invoked
by the virtual machine?
regards,
Folkert van Heusden
--
Always wondered what the latency of your webserver is? Or how much more
latency you get when you go through a proxy server/tor? The numbers
tell the tale and with HTTPing you know them!
http://www.vanheusden.com/httping/
-----------------------------------------------------------------------
Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: cache write back & barriers
2013-06-13 8:47 ` folkert
@ 2013-06-14 10:53 ` Stefan Hajnoczi
2013-06-16 12:06 ` [virt-tools-list] " Richard W.M. Jones
0 siblings, 1 reply; 6+ messages in thread
From: Stefan Hajnoczi @ 2013-06-14 10:53 UTC (permalink / raw)
To: folkert; +Cc: kvm, virt-tools-list
On Thu, Jun 13, 2013 at 10:47:32AM +0200, folkert wrote:
> Hi,
>
> > > In virt-manager I saw that there's the option for cache writeback for
> > > storage devices.
> > > I'm wondering: does this also make kvm to ignore write barriers invoked
> > > by the virtual machine?
> >
> > No, that would be unsafe. When the guest issues a flush then QEMU will
> > ensure that data reaches the disk with -drive cache=writeback.
>
> Aha so the writeback behaves like the consume harddisks with write-cache
> on them.
> In that case maybe an extra note could be added to the virt-manager
> (excellent software by the way!) that if the client vm supports
> barriers, that write-back in that case then is safe. Agree?
CCed virt-manager mailing list so they can see your request.
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [virt-tools-list] cache write back & barriers
2013-06-14 10:53 ` Stefan Hajnoczi
@ 2013-06-16 12:06 ` Richard W.M. Jones
0 siblings, 0 replies; 6+ messages in thread
From: Richard W.M. Jones @ 2013-06-16 12:06 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: folkert, kvm, virt-tools-list
On Fri, Jun 14, 2013 at 12:53:04PM +0200, Stefan Hajnoczi wrote:
> On Thu, Jun 13, 2013 at 10:47:32AM +0200, folkert wrote:
> > Hi,
> >
> > > > In virt-manager I saw that there's the option for cache writeback for
> > > > storage devices.
> > > > I'm wondering: does this also make kvm to ignore write barriers invoked
> > > > by the virtual machine?
Looking at current git, the cache types supported by virt-manager are:
- none
- writethrough
- writeback
- default [virt-manager only, not in virt-install]
These translate directly into the libvirt <driver ... cache="...">
field which you can find documented here:
http://libvirt.org/formatdomain.html#elementsDisks
As far as I can tell (from looking at libvirt sources) as long as you
have a modern qemu these will translate to the same names on the qemu
command line.
> > > No, that would be unsafe. When the guest issues a flush then QEMU will
> > > ensure that data reaches the disk with -drive cache=writeback.
> >
> > Aha so the writeback behaves like the consume harddisks with write-cache
> > on them.
In answer to the original question by 'folkert':
> > In that case maybe an extra note could be added to the virt-manager
> > (excellent software by the way!) that if the client vm supports
> > barriers, that write-back in that case then is safe. Agree?
I suspect the problem with doing this is it depends on the hypervisor.
Likely for qemu and Xen (since it uses a qemu device model) this would
be true. Possibly not for other hypervisors that virt-manager can
control.
Generally speaking, it would be nice to document these properly and
also how they are implemented in different hypervisors, because I know
I for one don't find these settings very obvious. So, patches welcome!
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-06-16 12:06 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-12 8:03 cache write back & barriers folkert
2013-06-13 8:26 ` Stefan Hajnoczi
2013-06-13 8:47 ` folkert
2013-06-14 10:53 ` Stefan Hajnoczi
2013-06-16 12:06 ` [virt-tools-list] " Richard W.M. Jones
2013-06-13 14:40 ` Alexandre DERUMIER
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).