qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Zhang Haoyu <zhanghy@sangfor.com>
Cc: Kevin Wolf <kwolf@redhat.com>, qemu-devel <qemu-devel@nongnu.org>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] qcow2-cache: conditionally call bdrv_flush() in qcow2_cache_flush()
Date: Thu, 13 Nov 2014 11:53:52 +0000	[thread overview]
Message-ID: <20141113115352.GR7462@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <201411070930569161961@sangfor.com>

[-- Attachment #1: Type: text/plain, Size: 815 bytes --]

On Fri, Nov 07, 2014 at 09:30:59AM +0800, Zhang Haoyu wrote:
> Needless to call bdrv_flush() in qcow2_cache_flush()
> if no cache entry is dirty.

Did you audit all qcow2 cache callers to make sure they don't rely on
the cache flush?

Maybe it's not safe to optimize it away if callers assume previously
written data will be persisted as part of qcow2 cache flushing.

We need to be very careful when optimizing out cache flushes so that we
don't introduce data integrity problems.

> 
> Signed-off-by: Zhang Haoyu <zhanghy@sangfor.com>
> ---
>  block/qcow2-cache.c | 24 +++++++++++++-----------
>  1 file changed, 13 insertions(+), 11 deletions(-)

Please post benchmark configuration and performance results, if you ran
any.  Data makes performance optimization patches much more convincing.

[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]

      reply	other threads:[~2014-11-13 11:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-07  1:30 [Qemu-devel] [PATCH] qcow2-cache: conditionally call bdrv_flush() in qcow2_cache_flush() Zhang Haoyu
2014-11-13 11:53 ` Stefan Hajnoczi [this message]

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=20141113115352.GR7462@stefanha-thinkpad.redhat.com \
    --to=stefanha@gmail.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=zhanghy@sangfor.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).