Skip to content

RFC kvm/vhost: enable durty logging during memory registration

Michael S. Tsirkin qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5cpu: add set_memory flag to request dirty loggingcpu-common.h exec.c hw/vhost.c +1 more+29 -130 replies
2/5kvm: halve number of set memory calls for vgakvm-all.c+36 -230 replies
3/5vhost: skip memory which needs dirty logginghw/vhost.c+4 -00 replies
4/5vhost: optimize out no-change assignmenthw/vhost.c+54 -00 replies
5/5cirrus_vga: flag on-device ram for dirty logginghw/cirrus_vga.c+11 -50 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH RFC 0/5] kvm/vhost: enable durty logging during memory registration

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 'vga: flag vga ram for notifiers'.
Warning: compile-tested only.

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(-)
Signature · 1 line
1.7.3.2.91.g446ac