All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: "Gonglei (Arei)" <arei.gonglei@huawei.com>
Cc: "chenliang (T)" <chenliang88@huawei.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	Juan Quintela <quintela@redhat.com>, "pl@kamp.de" <pl@kamp.de>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"aliguori@amazon.com" <aliguori@amazon.com>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 2/7] migration: Add counters of updating the dirty bitmap
Date: Fri, 28 Feb 2014 09:37:31 +0000	[thread overview]
Message-ID: <20140228093729.GC2695@work-vm> (raw)
In-Reply-To: <33183CC9F5247A488A2544077AF19020815D2278@SZXEMA503-MBS.china.huawei.com>

* Gonglei (Arei) (arei.gonglei@huawei.com) wrote:
> Add counters to log the times of updating the dirty bitmap.

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

> Signed-off-by: ChenLiang <chenliang88@huawei.com>
> Signed-off-by: Gonglei <arei.gonglei@huawei.com>
> ---
>  arch_init.c | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 
> diff --git a/arch_init.c b/arch_init.c
> index bc8d0eb..6823c5a 100644
> --- a/arch_init.c
> +++ b/arch_init.c
> @@ -110,6 +110,23 @@ static bool mig_throttle_on;
>  static int dirty_rate_high_cnt;
>  static void check_guest_throttling(void);
>  
> +static uint64_t bitmap_sync_cnt;
> +/* the functions *_bitmap_sync_cnt only run in migrate thread */
> +static inline void reset_bitmap_sync_cnt(void)
> +{
> +    bitmap_sync_cnt = 0;
> +}
> +
> +static inline void increase_bitmap_sync_cnt(void)
> +{
> +    bitmap_sync_cnt++;
> +}
> +
> +static inline uint64_t get_bitmap_sync_cnt(void)
> +{
> +    return bitmap_sync_cnt;
> +}
> +
>  /***********************************************************/
>  /* ram save/restore */
>  
> @@ -450,6 +467,8 @@ static void migration_bitmap_sync(void)
>      int64_t end_time;
>      int64_t bytes_xfer_now;
>  
> +    increase_bitmap_sync_cnt();
> +
>      if (!bytes_xfer_prev) {
>          bytes_xfer_prev = ram_bytes_transferred();
>      }
> @@ -692,6 +711,7 @@ static int ram_save_setup(QEMUFile *f, void *opaque)
>      migration_dirty_pages = ram_pages;
>      mig_throttle_on = false;
>      dirty_rate_high_cnt = 0;
> +    reset_bitmap_sync_cnt();
>  
>      if (migrate_use_xbzrle()) {
>          XBZRLE.cache = cache_init(migrate_xbzrle_cache_size() /
> -- 
> 1.7.12.4
> 
> 
> Best regards,
> -Gonglei
> 
> 
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

  reply	other threads:[~2014-02-28  9:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-28  4:08 [Qemu-devel] [PATCH 2/7] migration: Add counters of updating the dirty bitmap Gonglei (Arei)
2014-02-28  9:37 ` Dr. David Alan Gilbert [this message]
2014-02-28 13:11 ` Eric Blake
2014-02-28 13:26   ` 陈梁
2014-03-05 16:18 ` Juan Quintela
2014-03-06 10:50   ` Gonglei
2014-03-06 13:19     ` 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=20140228093729.GC2695@work-vm \
    --to=dgilbert@redhat.com \
    --cc=aliguori@amazon.com \
    --cc=arei.gonglei@huawei.com \
    --cc=chenliang88@huawei.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=pl@kamp.de \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@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.