qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: Kevin Wolf <kwolf@redhat.com>,
	armbru@redhat.com, Alexander Graf <agraf@suse.de>,
	qemu-devel@nongnu.org, Paul Brook <paul@codesourcery.com>,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive
Date: Tue, 11 May 2010 22:11:46 +0300	[thread overview]
Message-ID: <4BE9ABF2.7090902@redhat.com> (raw)
In-Reply-To: <4BE97A58.2070907@codemonkey.ws>

On 05/11/2010 06:40 PM, Anthony Liguori wrote:
>
> But if the goal is to make sure that fsync's don't result in data 
> actually being on disk, there are many other ways to accomplish this.  
> First, for the vast majority of users, this is already the case 
> because ext3 defaults to disabling barriers.  Alex is running into 
> this issue only because SuSE enables barriers by default for ext3 and 
> fsync()'s are horribly slow on ext3.  The fact that this is measurable 
> is purely a statement of ext3 suckage and a conscious decision by the 
> SuSE team to live with that suckage.  It shouldn't be nearly as bad on 
> ext4.
>

There is a huge difference between disabling barriers and cache=volatile.

With barrier=0, data is still forced out of host pagecache and into disk 
cache; it's simply not forced from disk cache to the platter.  But since 
the disk cache is very limited, you'll still be running at disk speed.

With cache=volatile and enough memory you'll never wait for the disk to 
write data.

>
> On the other hand, the cost of adding another caching option is pretty 
> significant.  Very few users really understand what caching options 
> they should use under what circumstance.  Adding another option will 
> just make that worse.  The fact that this new option can result in 
> data corruption that won't occur under normal circumstances is troubling.

I don't think it's a real problem with proper naming, but we can always 
hide the option behind a ./configure --enable-developer-options.

>
>> Mounting a filesystem with barrier=0 is not a good answer because it's a
>> global setting.  While my qemu VM may be disposable, it's unlikely 
>> that the
>> same is true of the rest of my machine.
>
> You can have multiple mounts.  In fact, you can just make a loopback 
> mount within your existing file system which means that you don't even 
> have to muck with your disk.
>
> If your VM is disposable, then shouldn't you be using -snapshot?

For my use case (autotest) the VM is not disposable (it's reused between 
tests) but I don't care about the data in case of a host crash.

>
>
>>    By your argument linux shouldn't be
>> allowing me to do that in the first place because a dumb sysadmin 
>> could use
>> that option on the filesystem containing the mail store. In fact with 
>> the
>> average user that's *likely* to happen because they'll only have a 
>> single
>> partition on their machine.
>
> We aren't preventing sophisticated users from doing sophisticated 
> things.  But why should we simplify something that most people don't 
> need and if they accidentally use it, bad things will happen?

We don't have a real alternative.

-- 
Do not meddle in the internals of kernels, for they are subtle and quick to panic.

  parent reply	other threads:[~2010-05-11 19:12 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-10 21:51 [Qemu-devel] [PATCH 0/2] Enable qemu block layer to not flush Alexander Graf
2010-05-10 21:51 ` [Qemu-devel] [PATCH 1/2] Add no-op aio emulation stub Alexander Graf
2010-05-10 21:51   ` [Qemu-devel] [PATCH 2/2] Add flush=off parameter to -drive Alexander Graf
2010-05-11  8:36     ` [Qemu-devel] " Kevin Wolf
2010-05-11 10:55       ` Christoph Hellwig
2010-05-11 12:15         ` Paul Brook
2010-05-11 12:43           ` Anthony Liguori
2010-05-11 13:12             ` Paul Brook
2010-05-11 13:20               ` Anthony Liguori
2010-05-11 13:50                 ` Paul Brook
2010-05-11 15:40                   ` Anthony Liguori
2010-05-11 15:53                     ` Paul Brook
2010-05-11 17:09                       ` Anthony Liguori
2010-05-11 22:33                         ` Paul Brook
2010-05-11 19:11                     ` Avi Kivity [this message]
2010-05-11 16:32                 ` Jamie Lokier
2010-05-11 17:15                   ` Anthony Liguori
2010-05-11 18:13                     ` Jamie Lokier
2010-05-11 15:18           ` Alexander Graf
2010-05-11 18:20           ` Jamie Lokier
2010-05-11 21:58             ` Paul Brook
2010-05-11 22:11               ` Paul Brook
2010-05-12 10:09                 ` Jamie Lokier
2010-05-17 12:40                 ` Christoph Hellwig
2010-05-14  9:16         ` Markus Armbruster
2010-05-17 12:41           ` Christoph Hellwig
2010-05-17 12:42             ` Alexander Graf
2010-05-11 19:04       ` Avi Kivity
2010-05-12 15:05       ` Alexander Graf
2010-05-12 15:36         ` Kevin Wolf
2010-05-12 15:51           ` Alexander Graf
2010-05-11  6:18   ` [Qemu-devel] [PATCH 1/2] Add no-op aio emulation stub Stefan Hajnoczi
2010-05-11  8:29   ` [Qemu-devel] " Kevin Wolf
2010-05-10 21:59 ` [Qemu-devel] [PATCH 0/2] Enable qemu block layer to not flush Anthony Liguori
2010-05-10 22:03   ` Alexander Graf
2010-05-10 22:12     ` Anthony Liguori
2010-05-11 21:48       ` Jamie Lokier
2010-05-12  8:51         ` Stefan Hajnoczi
2010-05-12  9:42           ` Jamie Lokier
2010-05-12 10:43             ` Stefan Hajnoczi
2010-05-12 12:50               ` Jamie Lokier

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=4BE9ABF2.7090902@redhat.com \
    --to=avi@redhat.com \
    --cc=agraf@suse.de \
    --cc=anthony@codemonkey.ws \
    --cc=armbru@redhat.com \
    --cc=hch@lst.de \
    --cc=kwolf@redhat.com \
    --cc=paul@codesourcery.com \
    --cc=qemu-devel@nongnu.org \
    /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).