From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Peter Xu <peterx@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
qemu-devel@nongnu.org, "Michael S . Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH RFC 7/9] KVM: Cache kvm slot dirty bitmap size
Date: Wed, 25 Mar 2020 18:49:49 +0000 [thread overview]
Message-ID: <20200325184949.GF2635@work-vm> (raw)
In-Reply-To: <20200205141749.378044-8-peterx@redhat.com>
* Peter Xu (peterx@redhat.com) wrote:
> Cache it too because we'll reference it more frequently in the future.
>
> Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> ---
> accel/kvm/kvm-all.c | 1 +
> include/sysemu/kvm_int.h | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
> index f81e7a644b..ea7b8f7ca5 100644
> --- a/accel/kvm/kvm-all.c
> +++ b/accel/kvm/kvm-all.c
> @@ -548,6 +548,7 @@ static void kvm_slot_init_dirty_bitmap(KVMSlot *mem)
> hwaddr bitmap_size = ALIGN(((mem->memory_size) >> TARGET_PAGE_BITS),
> /*HOST_LONG_BITS*/ 64) / 8;
> mem->dirty_bmap = g_malloc0(bitmap_size);
> + mem->dirty_bmap_size = bitmap_size;
> }
>
> /* Sync dirty bitmap from kernel to KVMSlot.dirty_bmap */
> diff --git a/include/sysemu/kvm_int.h b/include/sysemu/kvm_int.h
> index 1a19bfef80..71c9946ecf 100644
> --- a/include/sysemu/kvm_int.h
> +++ b/include/sysemu/kvm_int.h
> @@ -23,6 +23,7 @@ typedef struct KVMSlot
> int old_flags;
> /* Dirty bitmap cache for the slot */
> unsigned long *dirty_bmap;
> + unsigned long dirty_bmap_size;
> /* Cache of the address space ID */
> int as_id;
> /* Cache of the offset in ram address space */
> --
> 2.24.1
>
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2020-03-25 18:51 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-05 14:17 [PATCH RFC 0/9] KVM: Dirty ring support (QEMU part) Peter Xu
2020-02-05 14:17 ` [PATCH RFC 1/9] KVM: Fixup kvm_log_clear_one_slot() ioctl return check Peter Xu
2020-03-25 16:34 ` Dr. David Alan Gilbert
2020-03-25 17:43 ` Peter Xu
2020-02-05 14:17 ` [PATCH RFC 2/9] linux-headers: Update Peter Xu
2020-02-05 14:17 ` [PATCH RFC 3/9] memory: Introduce log_sync_global() to memory listener Peter Xu
2020-03-25 16:52 ` Dr. David Alan Gilbert
2020-03-25 17:02 ` Peter Xu
2020-02-05 14:17 ` [PATCH RFC 4/9] KVM: Create the KVMSlot dirty bitmap on flag changes Peter Xu
2020-03-25 17:44 ` Dr. David Alan Gilbert
2020-02-05 14:17 ` [PATCH RFC 5/9] KVM: Provide helper to get kvm dirty log Peter Xu
2020-03-25 17:52 ` Dr. David Alan Gilbert
2020-03-25 18:15 ` Peter Xu
2020-02-05 14:17 ` [PATCH RFC 6/9] KVM: Provide helper to sync dirty bitmap from slot to ramblock Peter Xu
2020-03-25 18:47 ` Dr. David Alan Gilbert
2020-02-05 14:17 ` [PATCH RFC 7/9] KVM: Cache kvm slot dirty bitmap size Peter Xu
2020-03-25 18:49 ` Dr. David Alan Gilbert [this message]
2020-02-05 14:17 ` [PATCH RFC 8/9] KVM: Add dirty-ring-size property Peter Xu
2020-03-25 20:00 ` Dr. David Alan Gilbert
2020-03-25 20:42 ` Peter Xu
2020-03-26 13:41 ` Dr. David Alan Gilbert
2020-03-26 16:03 ` Peter Xu
2020-03-25 20:14 ` Dr. David Alan Gilbert
2020-03-25 20:48 ` Peter Xu
2020-02-05 14:17 ` [PATCH RFC 9/9] KVM: Dirty ring support Peter Xu
2020-03-25 20:41 ` Dr. David Alan Gilbert
2020-03-25 21:32 ` Peter Xu
2020-03-26 14:14 ` Dr. David Alan Gilbert
2020-03-26 16:10 ` Peter Xu
2020-02-05 14:51 ` [PATCH RFC 0/9] KVM: Dirty ring support (QEMU part) no-reply
2020-03-03 17:32 ` Peter Xu
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=20200325184949.GF2635@work-vm \
--to=dgilbert@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.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).