All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: qemu-trivial <qemu-trivial@nongnu.org>,
	Zhang Haoyu <zhanghy@sangfor.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] snapshot: use local variable to bdrv_pwrite_sync L1 table
Date: Thu, 23 Oct 2014 09:03:25 +0200	[thread overview]
Message-ID: <20141023070325.GA3522@noname.redhat.com> (raw)
In-Reply-To: <54482D38.5080904@redhat.com>

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

Am 23.10.2014 um 00:18 hat Eric Blake geschrieben:
> On 10/21/2014 03:24 AM, Max Reitz wrote:
> > On 2014-10-21 at 10:04, Zhang Haoyu wrote:
> >> Use local variable to bdrv_pwrite_sync L1 table,
> >> needless to make conversion of cached L1 table between
> >> big-endian and host style.
> >>
> >> Signed-off-by: Zhang Haoyu <zhanghy@sangfor.com>
> >> ---
> >>   block/qcow2-refcount.c | 22 +++++++---------------
> >>   1 file changed, 7 insertions(+), 15 deletions(-)
> >>
> 
> I know we're up to v5 and that Max already took it into his branch, but...
> 
> 
> >>       l1_size2 = l1_size * sizeof(uint64_t);
> >> +    l1_table = g_try_malloc0(align_offset(l1_size2, 512));
> > 
> > I wanted to propose using qemu_try_blockalign(), but since it'd require
> > a memset() afterwards, it gets rather ugly.
> 
> Not after this recent patch:
> 
> https://lists.gnu.org/archive/html/qemu-devel/2014-10/msg02499.html

We can switch to qemu_try_blockalign0() in a follow-up patch.

But this is far from being a fast path, so there is very little to gain
anyway.

Kevin

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

WARNING: multiple messages have this Message-ID (diff)
From: Kevin Wolf <kwolf@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: qemu-trivial <qemu-trivial@nongnu.org>,
	Zhang Haoyu <zhanghy@sangfor.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] snapshot: use local variable to bdrv_pwrite_sync L1 table
Date: Thu, 23 Oct 2014 09:03:25 +0200	[thread overview]
Message-ID: <20141023070325.GA3522@noname.redhat.com> (raw)
In-Reply-To: <54482D38.5080904@redhat.com>

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

Am 23.10.2014 um 00:18 hat Eric Blake geschrieben:
> On 10/21/2014 03:24 AM, Max Reitz wrote:
> > On 2014-10-21 at 10:04, Zhang Haoyu wrote:
> >> Use local variable to bdrv_pwrite_sync L1 table,
> >> needless to make conversion of cached L1 table between
> >> big-endian and host style.
> >>
> >> Signed-off-by: Zhang Haoyu <zhanghy@sangfor.com>
> >> ---
> >>   block/qcow2-refcount.c | 22 +++++++---------------
> >>   1 file changed, 7 insertions(+), 15 deletions(-)
> >>
> 
> I know we're up to v5 and that Max already took it into his branch, but...
> 
> 
> >>       l1_size2 = l1_size * sizeof(uint64_t);
> >> +    l1_table = g_try_malloc0(align_offset(l1_size2, 512));
> > 
> > I wanted to propose using qemu_try_blockalign(), but since it'd require
> > a memset() afterwards, it gets rather ugly.
> 
> Not after this recent patch:
> 
> https://lists.gnu.org/archive/html/qemu-devel/2014-10/msg02499.html

We can switch to qemu_try_blockalign0() in a follow-up patch.

But this is far from being a fast path, so there is very little to gain
anyway.

Kevin

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

  parent reply	other threads:[~2014-10-23  7:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-21  8:04 [Qemu-trivial] [PATCH] snapshot: use local variable to bdrv_pwrite_sync L1 table Zhang Haoyu
2014-10-21  8:04 ` [Qemu-devel] " Zhang Haoyu
2014-10-21  9:24 ` [Qemu-trivial] " Max Reitz
2014-10-21  9:24   ` Max Reitz
2014-10-21 10:49   ` [Qemu-trivial] [Qemu-devel] [PATCH] snapshot: use local variable to bdrv_pwrite_syncL1 table Zhang Haoyu
2014-10-21 10:49     ` Zhang Haoyu
2014-10-21 10:53     ` [Qemu-trivial] " Max Reitz
2014-10-21 10:53       ` Max Reitz
2014-10-22 22:18   ` [Qemu-trivial] [Qemu-devel] [PATCH] snapshot: use local variable to bdrv_pwrite_sync L1 table Eric Blake
2014-10-22 22:18     ` Eric Blake
2014-10-23  1:02     ` [Qemu-trivial] " Gonglei
2014-10-23  1:02       ` Gonglei
2014-10-23  7:03     ` Kevin Wolf [this message]
2014-10-23  7:03       ` Kevin Wolf
2014-10-23  7:12       ` [Qemu-trivial] " Max Reitz
2014-10-23  7:12         ` Max Reitz

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=20141023070325.GA3522@noname.redhat.com \
    --to=kwolf@redhat.com \
    --cc=eblake@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@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 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.