qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Jidong Xiao <jidong.xiao@gmail.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Question regarding two variables in qemu migration code
Date: Tue, 13 Jan 2015 09:38:15 +0000	[thread overview]
Message-ID: <20150113093815.GA5193@work-vm> (raw)
In-Reply-To: <CAG4AFWYiRpwOqY0dyFq_C0+NpaNwZ3ijn94_YS1CuXLNKrSAgA@mail.gmail.com>

* Jidong Xiao (jidong.xiao@gmail.com) wrote:
> Hi,

Hi,

> I am looking at the qemu source code, and trying to understand the
> migration part. In arch_init.c, there are two variables which seems
> quite confusing to me,
> 
> They are:
> 
> static uint64_t migration_dirty_pages;

'migration_dirty_pages' is the number of pages that are currently known
that need to be sent to the destination; it goes down whenever we send
a page, but goes up when we sync the dirty bitmap that tells us that
something changed the data in the page (see migration_bitmap_sync_range )

> static int64_t num_dirty_pages_period; // defined in function
> migration_bitmap_sync()

This is looking how many pages we've noticed are now dirty within
a particular time - to try and get an estimate of how fast memory is changing
If you see migration_bitmap_sync  has an:
       if (end_time > start_time + 1000) {

and inside there it uses num_dirty_pages_period to update dirty_pages_rate.

> 
> Can anyone kindly explain that what does these two variables mean? Thanks.
> 
> -Jidong

Dave
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

  reply	other threads:[~2015-01-13  9:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-13  2:45 [Qemu-devel] Question regarding two variables in qemu migration code Jidong Xiao
2015-01-13  9:38 ` Dr. David Alan Gilbert [this message]
2015-01-13 17:58   ` Jidong Xiao
2015-01-13 18:11     ` Dr. David Alan Gilbert

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=20150113093815.GA5193@work-vm \
    --to=dgilbert@redhat.com \
    --cc=jidong.xiao@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /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).