All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vincent KHERBACHE <vincent.kherbache@inria.fr>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel]  Get the dirty bitmap of a whole VM
Date: Thu, 13 Feb 2014 18:06:59 +0100	[thread overview]
Message-ID: <52FCFBB3.5000401@inria.fr> (raw)

Hi all,

I'm trying to calculate the dirty bytes rate of a VM by traveling the
corresponding memory dirty bitmaps.

I get a bitmap from KVM kernel space using the following ioctl call :
kvm_vm_ioctl(s, KVM_GET_DIRTY_LOG, &d);

Also, I'm getting the bitmap for each memory slot inside the KVMState
object, but I obtain strange results..

I reused some code from the 'kvm_physical_sync_dirty_bitmap' function
but I wonder if I should really use each available memory slot ? or if
there is a way to obtain the whole 'MemoryRegionSection' of a VM ?


For instance, there is roughly what I do :

/******************************/
KVMState *s = kvm_state;
KVMDirtyLog d;

for (int i=0; i <=; i++) {
    if (&s->slots[i]->memory_size > 0) {
        d.slot = &s->slots[i]->slot;
        kvm_vm_ioctl(s, KVM_GET_DIRTY_LOG, &d);
    }
}
/******************************/


Any help/advice would be welcome.
Thanks,

-- 
Vincent KHERBACHE

                 reply	other threads:[~2014-02-13 17:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=52FCFBB3.5000401@inria.fr \
    --to=vincent.kherbache@inria.fr \
    --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 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.