From: Jitendra Kolhe <jitendra.kolhe@hpe.com>
To: "Michael S. Tsirkin" <mst@redhat.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>
Cc: qemu-devel@nongnu.org, pbonzini@redhat.com,
crosthwaite.peter@gmail.com, rth@twiddle.net, eblake@redhat.com,
lcapitulino@redhat.com, stefanha@redhat.com, armbru@redhat.com,
quintela@redhat.com, den@openvz.org, JBottomley@Odin.com,
borntraeger@de.ibm.com, amit.shah@redhat.com,
ehabkost@redhat.com, mohan_parthasarathy@hpe.com, simhan@hpe.com
Subject: Re: [Qemu-devel] [PATCH v2] migration: skip sending ram pages released by virtio-balloon driver.
Date: Fri, 29 Apr 2016 16:01:04 +0530 [thread overview]
Message-ID: <572337E8.10604@hpe.com> (raw)
In-Reply-To: <20160413142542-mutt-send-email-mst@redhat.com>
On 4/13/2016 5:06 PM, Michael S. Tsirkin wrote:
> On Wed, Apr 13, 2016 at 12:15:38PM +0100, Dr. David Alan Gilbert wrote:
>> * Michael S. Tsirkin (mst@redhat.com) wrote:
>>> On Wed, Apr 13, 2016 at 04:24:55PM +0530, Jitendra Kolhe wrote:
>>>> Can we extend support for post-copy in a different patch set?
>>>
>>> If the optimization does not *help* on some paths,
>>> that's fine. The issue is with adding extra code
>>> special-casing protocols:
>>>
>>> + if (migrate_postcopy_ram()) {
>>> + balloon_bitmap_disable_state = BALLOON_BITMAP_DISABLE_PERMANENT;
>>> + }
>>>
>>> Generally when one sees that patchset breaks XYZ...
>>> the easy solution is "check for XYZ
>>> and disable the optimization". But do this enough times
>>> and the codebase becomes impossible to reason about.
>>> why did migration become slower? oh it enabled
>>> optimization A and that conflicts with optimization B ...
Ok, I understand the confusion caused by such checks. Will remove
the migration_postcopy checks from the patch and make sure things
don’t break in postcopy path.
>>
>> Hang on; this is getting all very complicated; I wouldn't start tieing
>> this thing up with postcopy yet. Lets try and keep this simple for starters.
>>
>> Dave
>
> Absolutely, but I don't understand why is this implemented in such
> a complex way.
> 1. keep track of pages in balloon in a bitmap
> 2. put bitmap in a ram block
> 3. check that before sending page. if there - it's a zero page
>
Thanks for the suggestion, putting bitmap in ramblock does remove the
code for migrating and dirty page tracking of balloon bitmap pages itself.
In case, the feature is turned-off, the balloon bitmap ramblock is resized
to 0 to make sure that the bitmap is not migrated to reduce the overhead.
> All the complexity is to avoid migrating an extra bit per page
> and it seems like a premature optimization to me at this stage.
>
Major benefit of the optimization is to avoid zero page scan for
ballooned out pages. Skipping migrating extra bit per ballooned out
page is just an add-on benefit without any overhead as long as it
doesn’t break any protocol.
Thanks,
- Jitendra
>>>
>>>
>>>> and use
>>>> current patch set to support other remaining protocols?
>>>
>>> Even disregarding postcopy, I think there were
>>> comments that need to be addressed.
>>>
>>> --
>>> MST
>> --
>> Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2016-04-29 10:31 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-28 4:16 [Qemu-devel] [PATCH v2] migration: skip sending ram pages released by virtio-balloon driver Jitendra Kolhe
2016-03-28 6:59 ` Michael S. Tsirkin
2016-03-29 10:05 ` Paolo Bonzini
2016-03-29 10:47 ` Jitendra Kolhe
2016-03-29 10:48 ` Paolo Bonzini
2016-04-01 11:19 ` Jitendra Kolhe
2016-03-28 10:36 ` Denis V. Lunev
2016-03-29 11:34 ` Jitendra Kolhe
2016-03-28 14:11 ` Eric Blake
2016-03-29 12:13 ` Jitendra Kolhe
2016-03-29 12:28 ` Michael S. Tsirkin
2016-04-01 11:08 ` Jitendra Kolhe
2016-04-10 16:59 ` Michael S. Tsirkin
2016-04-13 10:54 ` Jitendra Kolhe
2016-04-13 11:10 ` Michael S. Tsirkin
2016-04-13 11:15 ` Dr. David Alan Gilbert
2016-04-13 11:36 ` Michael S. Tsirkin
2016-04-29 10:31 ` Jitendra Kolhe [this message]
2016-03-31 16:39 ` Dr. David Alan Gilbert
2016-04-05 10:04 ` Jitendra Kolhe
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=572337E8.10604@hpe.com \
--to=jitendra.kolhe@hpe.com \
--cc=JBottomley@Odin.com \
--cc=amit.shah@redhat.com \
--cc=armbru@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=crosthwaite.peter@gmail.com \
--cc=den@openvz.org \
--cc=dgilbert@redhat.com \
--cc=eblake@redhat.com \
--cc=ehabkost@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=mohan_parthasarathy@hpe.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=rth@twiddle.net \
--cc=simhan@hpe.com \
--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 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).