From: Stefan Hajnoczi <stefanha@gmail.com>
To: Dmitry Konishchev <konishchev@gmail.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
stanislav.ievlev@gmail.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] [qemu-img] CPU consuming optimization
Date: Tue, 17 May 2011 16:35:50 +0100 [thread overview]
Message-ID: <BANLkTim6osGVGU8oqpx0ZcOVU17c7LS5AA@mail.gmail.com> (raw)
In-Reply-To: <BANLkTinHhx5jTgcH-cytci=fNdk2V7zssg@mail.gmail.com>
On Tue, May 17, 2011 at 3:33 PM, Dmitry Konishchev <konishchev@gmail.com> wrote:
> Hi! I was wondering why qemu-img consumes so much CPU when it converts
> one partially allocated qcow2 image to another qcow2 image and I've
> written a patch which improves the situation a little.
Please see http://wiki.qemu.org/Contribute/SubmitAPatch, which asks
that patches are sent inline (not as attachments) for easy review and
that you follow the coding style (see the CODING_STYLE file). Patches
also need a Signed-off-by: line.
The unrolled loop makes the function rely on len being a multiple of
sizeof(long) * 4, otherwise it accesses beyond the end of sector[].
So for this use case it's okay but the function is generic anymore.
GNU cp(1) tries to detect holes in files and image formats could tell
us about unallocated regions using bdrv_is_allocated(). So I think
there are ways to avoid comparing so much data in the first place, if
you are interested in looking into that.
Stefan
next prev parent reply other threads:[~2011-05-17 15:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-17 14:33 [Qemu-devel] [PATCH] [qemu-img] CPU consuming optimization Dmitry Konishchev
2011-05-17 15:35 ` Stefan Hajnoczi [this message]
2011-05-18 6:55 ` Dmitry Konishchev
2011-05-18 7:57 ` Stefan Hajnoczi
2011-05-18 8:05 ` Kevin Wolf
2011-05-18 9:18 ` Dmitry Konishchev
2011-05-18 9:31 ` Kevin Wolf
2011-05-18 10:27 ` Dmitry Konishchev
2011-05-18 11:03 ` [Qemu-devel] [PATCH] is_not_zero() optimization in qemu-img Dmitry Konishchev
2011-05-18 12:14 ` Kevin Wolf
2011-05-18 9:40 ` [Qemu-devel] [PATCH] [qemu-img] CPU consuming optimization Peter Maydell
2011-05-18 9:40 ` Peter Maydell
2011-05-18 10:27 ` Dmitry Konishchev
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=BANLkTim6osGVGU8oqpx0ZcOVU17c7LS5AA@mail.gmail.com \
--to=stefanha@gmail.com \
--cc=konishchev@gmail.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stanislav.ievlev@gmail.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).