All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hao QingFeng <haoqf@linux.vnet.ibm.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: Max Reitz <mreitz@redhat.com>,
	qemu-block@nongnu.org, qemu-devel@nongnu.org,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 2/3] block: Emit modules in bdrv_iterate_format()
Date: Wed, 2 Nov 2016 19:59:58 +0800	[thread overview]
Message-ID: <abdae418-682e-e4ec-9ef5-195da0d2d81b@linux.vnet.ibm.com> (raw)
In-Reply-To: <20161102111524.GE6182@noname.redhat.com>



在 2016-11-02 19:15, Kevin Wolf 写道:
> Am 02.11.2016 um 11:52 hat Hao QingFeng geschrieben:
>> Sorry for a bit late response. The function looks fine but just some
>> doubt on g_renew in this piece of code(and the legacy), does
>> g_renew(realloc) has much performance impact if it's call many times
>> since alloc and memory copy are both also run many times?  So how
>> about increase the memory for more instead of 1 each time?
>>
>> formats = g_renew(const char *, formats, count + 10);
>>
>> A new counter also needs to be introduced to record the space size.
> This code is not on a hot path, so keeping the code simple and easy to
> maintain is preferrable to complicating it just so --help can save a few
> CPU cycles.
Got it. thanks!
> Kevin
>

-- 
QingFeng Hao(Robin)

  reply	other threads:[~2016-11-02 12:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-12 20:49 [Qemu-devel] [PATCH 0/3] iotests: Skip 162 if there is no SSH support Max Reitz
2016-10-12 20:49 ` [Qemu-devel] [PATCH 1/3] block: Fix bdrv_iterate_format() sorting Max Reitz
2016-10-12 21:31   ` Eric Blake
2016-10-12 20:49 ` [Qemu-devel] [PATCH 2/3] block: Emit modules in bdrv_iterate_format() Max Reitz
2016-10-12 22:35   ` Eric Blake
2016-11-02 10:52   ` Hao QingFeng
2016-11-02 11:15     ` Kevin Wolf
2016-11-02 11:59       ` Hao QingFeng [this message]
2016-11-02 15:29       ` Eric Blake
2016-10-12 20:49 ` [Qemu-devel] [PATCH 3/3] iotests: Skip test 162 if there is no SSH support Max Reitz
2016-10-12 22:36   ` Eric Blake
2016-10-12 22:26 ` [Qemu-devel] [PATCH 0/3] iotests: Skip " no-reply
2016-10-28 15:13 ` 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=abdae418-682e-e4ec-9ef5-195da0d2d81b@linux.vnet.ibm.com \
    --to=haoqf@linux.vnet.ibm.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@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 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.