All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Jamie Lokier <jamie@shareable.org>
Cc: Bug 595117 <595117@bugs.launchpad.net>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Bug 595117] Re: qemu-nbd slow and missing "writeback" cache option
Date: Fri, 25 Jun 2010 10:32:33 +0200	[thread overview]
Message-ID: <20100625083233.GA5744@lst.de> (raw)
In-Reply-To: <20100624001603.GI7058@shareable.org>

On Thu, Jun 24, 2010 at 01:16:03AM +0100, Jamie Lokier wrote:
> Serge Hallyn wrote:
> > The default of qemu-img (of using O_SYNC) is not very sensible
> > because anyway, the client (the kernel) uses caches (write-back),
> > (and "qemu-nbd -d" doesn't flush those by the way). So if for
> > instance qemu-nbd is killed, regardless of whether qemu-nbd uses
> > O_SYNC, O_DIRECT or not, the data in the image will not be
> > consistent anyway, unless "syncs" are done by the client (like fsync
> > on the nbd device or sync mount option), and with qemu-nbd's O_SYNC
> > mode, those "sync"s will be extremely slow.
> 
> Do the "client syncs" cause the nbd server to fsync or fdatasync the file?

NBD does not have support for cache flushes.  Any nbd server needs to
use O_DSYNC-like semantics.

> I really wish qemu's options didn't give the false impression
> "nocache" does less caching than "writethrough".  O_DIRECT does
> caching in the disk controller/hardware, while O_SYNC hopefully does
> not, nowadays.

The current cache= options are misleading in many ways.  I'll post a
patchset soon to distangle the notion of using direct vs buffered I/O
from exposing and implementing a guest visible volatile write cache.

Exposing these improvements on the command linkes will have to wait for
the new -blockdev option.

  reply	other threads:[~2010-06-25 17:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20100616143321.24259.15137.malonedeb@palladium.canonical.com>
2010-06-16 19:59 ` [Qemu-devel] [Bug 595117] Re: qemu-nbd slow and missing "writeback" cache option Serge Hallyn
2010-06-16 20:14 ` Serge Hallyn
2010-06-16 20:22 ` Anthony Liguori
2010-06-16 20:36 ` Dustin Kirkland
2010-06-17 12:48   ` [Qemu-devel] " Stephane Chazelas
2010-06-17 15:52     ` Dustin Kirkland
2010-06-17 16:30 ` [Qemu-devel] " Brian Murray
2010-06-23 15:44 ` Serge Hallyn
2010-06-23 16:13 ` Serge Hallyn
2010-06-24  0:16   ` Jamie Lokier
2010-06-25  8:32     ` Christoph Hellwig [this message]
2010-07-07  9:01     ` Stephane Chazelas
2010-12-10  4:17 ` Launchpad Bug Tracker
2010-12-10  9:43 ` Stephane Chazelas
2010-12-13 14:24 ` Serge Hallyn

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=20100625083233.GA5744@lst.de \
    --to=hch@lst.de \
    --cc=595117@bugs.launchpad.net \
    --cc=jamie@shareable.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.