From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 0/5] kvm/vhost: enable durty logging during memory registration
Date: Thu, 7 Apr 2011 13:54:12 +0300 [thread overview]
Message-ID: <cover.1302173640.git.mst@redhat.com> (raw)
I've tested and applied this patchset on my tree.
Currently, vga cards that allocate vga ram, register it as regular ram,
and then request dirty logging from kvm (which is required for this hack
to function correctly). Both these operations involve memory slot
update and flush in kvm and in vhost which is a slow operation.
This was observed to slow down windows guests with a huge amount of
memory and cpu and with cirrus vga.
As a solution, this adds an explicit flag that
will enable dirty logging directly when registering
the ram. kvm then needs a single system call
to update tables for vga ram, vhost-net can simply ignore it.
This patchset only updates the cirrus vga lfb vram mapping.
Follow-up patchsets will update all the rest of the cards
and then remove vga_dirty_log_xxx completely.
This replaces the RFC patchset as well
as the RFC 'vga: flag vga ram for notifiers'.
Changes since RFC: in patch vhost: optimize out no-change assignment,
moved the no-change test to later in function to catch more
cases.
Test setup: host: 512G -smp 64 guest -m 256G -smp 32
cirrus vga; windows boot time goes down from 30 min to 1 min.
Michael S. Tsirkin (5):
cpu: add set_memory flag to request dirty logging
kvm: halve number of set memory calls for vga
vhost: skip memory which needs dirty logging
vhost: optimize out no-change assignment
cirrus_vga: flag on-device ram for dirty logging
cpu-common.h | 22 +++++++++++++++----
exec.c | 14 +++++++-----
hw/cirrus_vga.c | 16 +++++++++----
hw/vhost.c | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
kvm-all.c | 62 +++++++++++++++++++++++++++++++++---------------------
5 files changed, 134 insertions(+), 41 deletions(-)
--
1.7.3.2.91.g446ac
next reply other threads:[~2011-04-07 10:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-07 10:54 Michael S. Tsirkin [this message]
2011-04-07 10:54 ` [Qemu-devel] [PATCH 1/5] cpu: add set_memory flag to request dirty logging Michael S. Tsirkin
2011-04-07 10:54 ` [Qemu-devel] [PATCH 2/5] kvm: halve number of set memory calls for vga Michael S. Tsirkin
2011-04-07 10:54 ` [Qemu-devel] [PATCH 3/5] vhost: skip memory which needs dirty logging Michael S. Tsirkin
2011-04-07 10:54 ` [Qemu-devel] [PATCH 4/5] vhost: optimize out no-change assignment Michael S. Tsirkin
2011-04-07 10:54 ` [Qemu-devel] [PATCH 5/5] cirrus_vga: flag on-device ram for dirty logging Michael S. Tsirkin
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=cover.1302173640.git.mst@redhat.com \
--to=mst@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).