From: Kevin Wolf <kwolf@redhat.com>
To: "De Backer, Fred (Nokia - BE/Antwerp)" <fred.de_backer@nokia.com>
Cc: Nir Soffer <nsoffer@redhat.com>, Eric Blake <eblake@redhat.com>,
QEMU Developers <qemu-devel@nongnu.org>,
qemu-block <qemu-block@nongnu.org>,
"Richard W.M. Jones" <rjones@redhat.com>,
"Aamir T, Owais (Nokia - IN/Chennai)" <owais.aamir_t@nokia.com>
Subject: Re: [Qemu-devel] [Qemu-block] Request for clarification on qemu-img convert behavior zeroing target host_device
Date: Fri, 14 Dec 2018 13:26:59 +0100 [thread overview]
Message-ID: <20181214122659.GB4341@dhcp-200-186.str.redhat.com> (raw)
In-Reply-To: <VI1PR07MB334400B255A91277D3597F79AEA10@VI1PR07MB3344.eurprd07.prod.outlook.com>
Am 14.12.2018 um 11:59 hat De Backer, Fred (Nokia - BE/Antwerp) geschrieben:
> >>> Indeed, performance traces are important for issues like this.
> >>See strace of both FC27 and FC29 attached
>
> >Looks like you traced only the main thread. All the I/O is done in other threads.
> >These flags would be useful:
> >
> > strace -o log -f -T -tt
>
> New straces attached with mentioned flags. Both truncated due to file
> size at what I believe to be the same position in the "write-phase".
> FC29 has the "zeroing-phase" in front.
So this is indeed using BLKZEROOUT, which has a slow fallback in the
kernel (slow means ~12 seconds for each 2 GB chunk).
We need to avoid calling BLKZEROOUT in the context of pre-zeroing the
image for qemu-img convert.
Of course, we should also think about the other problem you mentioned,
related to copying a smaller image to a larger block device. Does this
require zeroing the parts after the image or should we leave them alone?
I'd tend to say that since you're passing the whole block device as a
target to 'qemu-img convert', and the whole block device will be visible
to a guest run with the same block device configuration, we should
indeed zero out the whole device. But then we would declare the F27
behaviour buggy and this case would stay slow (it would become slightly
faster because we avoid the double writes, but we wouldn't save the
writes to the unused space).
Or we could just refuse to convert if source and target aren't the same
size. Then you would have to use a raw filter driver to select a part
from the target image with the offset/size options. But this would break
backwards compatibility, and its use is not very intuitive either.
Unfortunately, this is just the kind of problems that raw images give
you. :-/
Kevin
next prev parent reply other threads:[~2018-12-14 12:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <DB6PR07MB33330E3562B0AF0ECC8307BCAEA00@DB6PR07MB3333.eurprd07.prod.outlook.com>
2018-12-13 13:12 ` [Qemu-devel] Request for clarification on qemu-img convert behavior zeroing target host_device De Backer, Fred (Nokia - BE/Antwerp)
2018-12-13 14:17 ` Eric Blake
2018-12-13 14:49 ` [Qemu-devel] [Qemu-block] " Kevin Wolf
2018-12-13 15:05 ` Eric Blake
2018-12-13 21:14 ` De Backer, Fred (Nokia - BE/Antwerp)
2018-12-13 21:53 ` Nir Soffer
[not found] ` <VI1PR07MB3344412C5DE71936F9689909AEA10@VI1PR07MB3344.eurprd07.prod.outlook.com>
2018-12-14 10:59 ` De Backer, Fred (Nokia - BE/Antwerp)
2018-12-14 12:26 ` Kevin Wolf [this message]
2018-12-14 12:52 ` De Backer, Fred (Nokia - BE/Antwerp)
2018-12-14 13:10 ` Richard W.M. Jones
2018-12-14 13:22 ` Daniel P. Berrangé
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=20181214122659.GB4341@dhcp-200-186.str.redhat.com \
--to=kwolf@redhat.com \
--cc=eblake@redhat.com \
--cc=fred.de_backer@nokia.com \
--cc=nsoffer@redhat.com \
--cc=owais.aamir_t@nokia.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=rjones@redhat.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).