All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Lieven <pl@kamp.de>, Fam Zheng <famz@redhat.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	qemu block <qemu-block@nongnu.org>
Subject: Re: [Qemu-devel] callout to *file in bdrv_co_get_block_status
Date: Mon, 27 Mar 2017 17:06:47 +0200	[thread overview]
Message-ID: <5cb7f3f5-cd3f-b54c-3109-140dee3b2cad@redhat.com> (raw)
In-Reply-To: <293a74e1-f355-6969-9b76-9913e7f56930@kamp.de>



On 27/03/2017 15:21, Peter Lieven wrote:
>>>
>>> I stumbled across the issue with lseek on a tmpfs because in the
>>> build process for our templates
>>> I temporarily have vmdks on a tmpfs and it takes ages before qemu-img
>>> convert starts to run (it iterates
>>> over every 64kb cluster with that callout to find_allocation and for
>>> some reason lseek is very slow on tmpfs).
>> Ok, thanks.  Perhaps it's worth benchmarking tmpfs specifically.  Apart
>> from the system call overhead (which does not really matter if you're
>> going to do a read), lseek on other filesystems should not be any slower
>> than read.
> 
> Okay, but the even the read is not really necessary if the metadata is
> correct?

Yeah, what I mean is:

- if you're going to do a read of non-zero blocks, the lseek you do
before reading those blocks should not matter.

- if you're going to skip the read of non-zero blocks, the lseek you do
is always going to be faster than reading them and then checking with
buffer_is_nonzero.

> Would it be an idea to introduce an inverse flag live BDRV_BLOCK_NOT_ZERO
> for cases where we know that there is really DATA and thus can avoid the
> second callout?

How would you know that a block is nonzero?

Paolo

  reply	other threads:[~2017-03-27 15:06 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-17 10:45 [Qemu-devel] callout to *file in bdrv_co_get_block_status Peter Lieven
2017-03-17 10:59 ` Paolo Bonzini
2017-03-17 11:11   ` Peter Lieven
2017-03-17 11:16     ` Paolo Bonzini
2017-03-17 11:20       ` Peter Lieven
2017-03-20  2:46         ` Fam Zheng
2017-03-20 11:21           ` Paolo Bonzini
2017-03-20 11:49             ` Fam Zheng
2017-03-20 12:17               ` Peter Lieven
2017-03-20 12:47               ` Peter Lieven
2017-03-20 13:13                 ` Peter Lieven
2017-03-20 13:23                   ` Paolo Bonzini
2017-03-20 13:35                     ` Peter Lieven
2017-03-20 14:05                       ` Paolo Bonzini
2017-03-20 16:43                         ` Peter Lieven
2017-03-20 16:56                           ` Paolo Bonzini
2017-03-27 13:21                             ` Peter Lieven
2017-03-27 15:06                               ` Paolo Bonzini [this message]
2017-03-31  7:55                                 ` Peter Lieven
2017-03-31 10:20                                   ` Paolo Bonzini
2017-03-17 11:24       ` Fam Zheng
2017-03-17 14:51         ` Paolo Bonzini
2017-03-18 16:16           ` Peter Lieven

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=5cb7f3f5-cd3f-b54c-3109-140dee3b2cad@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=famz@redhat.com \
    --cc=pl@kamp.de \
    --cc=qemu-block@nongnu.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.