From: Juan Quintela <quintela@redhat.com>
To: arei.gonglei@huawei.com
Cc: ChenLiang <chenliang88@huawei.com>,
weidong.huang@huawei.com, chegu_vinod@hp.com,
qemu-devel@nongnu.org, owasserm@redhat.com, pbonzini@redhat.com
Subject: Re: [Qemu-devel] [PATCH 05/10] migration: Fix the migrate auto converge process
Date: Tue, 11 Mar 2014 21:48:27 +0100 [thread overview]
Message-ID: <87fvmo31ic.fsf@elfo.mitica> (raw)
In-Reply-To: <1394542415-5152-6-git-send-email-arei.gonglei@huawei.com> (arei gonglei's message of "Tue, 11 Mar 2014 20:53:30 +0800")
<arei.gonglei@huawei.com> wrote:
> From: ChenLiang <chenliang88@huawei.com>
>
> It is inaccuracy and complex that using the transfer speed of
> migration thread to determine whether the convergence migration.
> The dirty page may be compressed by XBZRLE or ZERO_PAGE.The counter
> of updating dirty bitmap will be increasing continuously if the
> migration can't convergence.
"It is inexact and complex to use the migration transfer speed to
dectermine weather the convergence of migration."
> @@ -530,21 +523,11 @@ static void migration_bitmap_sync(void)
> /* more than 1 second = 1000 millisecons */
> if (end_time > start_time + 1000) {
> if (migrate_auto_converge()) {
> - /* The following detection logic can be refined later. For now:
> - Check to see if the dirtied bytes is 50% more than the approx.
> - amount of bytes that just got transferred since the last time we
> - were in this routine. If that happens >N times (for now N==4)
> - we turn on the throttle down logic */
> - bytes_xfer_now = ram_bytes_transferred();
> - if (s->dirty_pages_rate &&
> - (num_dirty_pages_period * TARGET_PAGE_SIZE >
> - (bytes_xfer_now - bytes_xfer_prev)/2) &&
> - (dirty_rate_high_cnt++ > 4)) {
> - trace_migration_throttle();
> - mig_throttle_on = true;
> - dirty_rate_high_cnt = 0;
> - }
> - bytes_xfer_prev = bytes_xfer_now;
> + if (get_bitmap_sync_cnt() > 15) {
> + /* It indicates that migration can't converge when the counter
> + is larger than fifteen. Enable the feature of auto
> converge */
Comment is not needed, it says excatly what the code does.
But why 15? It is not that I think that the older code is better or
worse than yours. Just that we move from one magic number to another
(that is even bigger).
Shouldn't it be easier jut just change mig_sleep_cpu()
to do something like:
static void mig_sleep_cpu(void *opq)
{
qemu_mutex_unlock_iothread();
g_usleep((2*get_bitmap_sync_cnt()*1000);
qemu_mutex_lock_iothread();
}
This would get the 30ms on the 15th iteration. I am open to change that
formula to anything different, but what I want is changing this to
something that makes the less convergence -> the more throotling.
BTW, you are testing this with any workload to see that it improves?
> + mig_throttle_on = true;
> + }
Vinod, what do you think?
Do you have a workload to test this?
Thanks, Juan.
next prev parent reply other threads:[~2014-03-11 20:48 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-11 12:53 [Qemu-devel] [PATCH 00/10] migration: Optimization the xbzrle and fix two corruption issues arei.gonglei
2014-03-11 12:53 ` [Qemu-devel] [PATCH 01/10] XBZRLE: Fix one XBZRLE " arei.gonglei
2014-03-11 20:26 ` Juan Quintela
2014-03-11 12:53 ` [Qemu-devel] [PATCH 02/10] migration: Add counters of updating the dirty bitmap arei.gonglei
2014-03-11 13:09 ` Eric Blake
2014-03-11 13:34 ` Gonglei (Arei)
2014-03-11 20:28 ` Juan Quintela
2014-03-11 12:53 ` [Qemu-devel] [PATCH 03/10] XBZRLE: optimize XBZRLE to decrease the cache missing arei.gonglei
2014-03-11 20:34 ` Juan Quintela
2014-03-18 12:20 ` Gonglei (Arei)
2014-03-11 20:52 ` Eric Blake
2014-03-11 12:53 ` [Qemu-devel] [PATCH 04/10] XBZRLE: rebuild the cache_is_cached function arei.gonglei
2014-03-11 13:11 ` Eric Blake
2014-03-11 20:37 ` Juan Quintela
2014-03-11 12:53 ` [Qemu-devel] [PATCH 05/10] migration: Fix the migrate auto converge process arei.gonglei
2014-03-11 20:48 ` Juan Quintela [this message]
2014-03-11 20:55 ` Eric Blake
2014-03-11 22:56 ` Chegu Vinod
2014-03-18 12:23 ` Gonglei (Arei)
2014-03-11 12:53 ` [Qemu-devel] [PATCH 06/10] migraion: optimiztion xbzrle by reducing data copy arei.gonglei
2014-03-11 20:56 ` Juan Quintela
2014-03-11 20:56 ` Juan Quintela
2014-03-11 20:58 ` Eric Blake
2014-03-11 12:53 ` [Qemu-devel] [PATCH 07/10] migraion: clear the death code arei.gonglei
2014-03-11 20:58 ` Juan Quintela
2014-03-11 20:59 ` Eric Blake
2014-03-11 12:53 ` [Qemu-devel] [PATCH 08/10] migration: s/uint64_t/int64_t the definitions of it_age arei.gonglei
2014-03-11 21:02 ` Eric Blake
2014-03-11 21:08 ` Juan Quintela
2014-03-11 12:53 ` [Qemu-devel] [PATCH 09/10] migration: expose the bitmap_sync_cnt to the end user arei.gonglei
2014-03-11 13:22 ` Eric Blake
2014-03-11 21:10 ` Juan Quintela
2014-03-11 12:53 ` [Qemu-devel] [PATCH 10/10] XBZRLE: update the doc of XBZRLE arei.gonglei
2014-03-11 21:09 ` Juan Quintela
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=87fvmo31ic.fsf@elfo.mitica \
--to=quintela@redhat.com \
--cc=arei.gonglei@huawei.com \
--cc=chegu_vinod@hp.com \
--cc=chenliang88@huawei.com \
--cc=owasserm@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=weidong.huang@huawei.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).