All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Denis V. Lunev" <den@openvz.org>
To: Wen Congyang <wency@cn.fujitsu.com>
Cc: Amit Shah <amit.shah@redhat.com>,
	Igor Redko <redkoi@virtuozzo.com>,
	Juan Quintela <quintela@redhat.com>,
	qemu-devel@nongnu.org, Anna Melekhova <annam@virtuozzo.com>
Subject: Re: [Qemu-devel] [PATCH 1/2] migration: bitmap_set is unnecessary as bitmap_new uses g_try_malloc0
Date: Fri, 25 Sep 2015 13:05:00 +0300	[thread overview]
Message-ID: <56051C4C.1020602@openvz.org> (raw)
In-Reply-To: <560515DC.8050004@cn.fujitsu.com>

On 09/25/2015 12:37 PM, Wen Congyang wrote:
> On 09/25/2015 05:31 PM, Denis V. Lunev wrote:
>> On 09/25/2015 12:24 PM, Wen Congyang wrote:
>>> On 09/25/2015 05:09 PM, Denis V. Lunev wrote:
>>>> we can omit calling of bitmap_set in migration_bitmap_extend and
>>>> ram_save_setup just after bitmap_new, which properly zeroes memory
>>>> inside.
>>> This patch is wrong. bitmap_set() is set all bits of the memory to 1,
>>> not 0.
>>>
>> OK, then I'll replace g_try_malloc0 with g_try_malloc in the next patch to avoid
>> double memset
> No, bitmap_new() is called in many places. Some caller needs zero memory, and
> some caller doesn't need...
>

you are correct with your proposal with double allocation for the next 
patch.
With a specific function like I have did in v2 g_try_malloc0 can be
replaced.

Anyway, I am fine with your proposal, this is not a (very) big deal. 
EINPROGRESS

Den

  reply	other threads:[~2015-09-25 10:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-24 12:53 [Qemu-devel] [PATCH 1/1] migration: fix deadlock Denis V. Lunev
2015-09-25  1:21 ` Wen Congyang
2015-09-25  8:03   ` Denis V. Lunev
2015-09-25  8:23     ` Wen Congyang
2015-09-25  9:09       ` [Qemu-devel] [PATCH v2 0/2] " Denis V. Lunev
2015-09-25  9:09         ` [Qemu-devel] [PATCH 1/2] migration: bitmap_set is unnecessary as bitmap_new uses g_try_malloc0 Denis V. Lunev
2015-09-25  9:24           ` Wen Congyang
2015-09-25  9:31             ` Denis V. Lunev
2015-09-25  9:37               ` Wen Congyang
2015-09-25 10:05                 ` Denis V. Lunev [this message]
2015-09-25  9:09         ` [Qemu-devel] [PATCH 2/2] migration: fix deadlock Denis V. Lunev
2015-09-25  9:35           ` Wen Congyang
2015-09-25  9:46         ` [Qemu-devel] [PATCH v2 0/2] " Wen Congyang
2015-09-28 10:55           ` Igor Redko
2015-09-28 15:12             ` Igor Redko
2015-09-29  8:47             ` Dr. David Alan Gilbert
2015-09-30 14:28               ` Igor Redko
2015-09-29 15:32       ` [Qemu-devel] [PATCH 1/1] " Igor Redko

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=56051C4C.1020602@openvz.org \
    --to=den@openvz.org \
    --cc=amit.shah@redhat.com \
    --cc=annam@virtuozzo.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=redkoi@virtuozzo.com \
    --cc=wency@cn.fujitsu.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.