- kvm-s390x-Fix-leak-in-machine_set_loadparm.patch [RHEL-98555] - kvm-hw-s390x-ccw-device-Fix-memory-leak-in-loadparm-sett.patch [RHEL-98555] - kvm-target-i386-Update-EPYC-CPU-model-for-Cache-property.patch [RHEL-52650] - kvm-target-i386-Update-EPYC-Rome-CPU-model-for-Cache-pro.patch [RHEL-52650] - kvm-target-i386-Update-EPYC-Milan-CPU-model-for-Cache-pr.patch [RHEL-52650] - kvm-target-i386-Add-couple-of-feature-bits-in-CPUID_Fn80.patch [RHEL-52650] - kvm-target-i386-Update-EPYC-Genoa-for-Cache-property-per.patch [RHEL-52650] - kvm-target-i386-Add-support-for-EPYC-Turin-model.patch [RHEL-52650] - kvm-include-qemu-compiler-add-QEMU_UNINITIALIZED-attribu.patch [RHEL-95479] - kvm-hw-virtio-virtio-avoid-cost-of-ftrivial-auto-var-ini.patch [RHEL-95479] - kvm-block-skip-automatic-zero-init-of-large-array-in-ioq.patch [RHEL-95479] - kvm-chardev-char-fd-skip-automatic-zero-init-of-large-ar.patch [RHEL-95479] - kvm-chardev-char-pty-skip-automatic-zero-init-of-large-a.patch [RHEL-95479] - kvm-chardev-char-socket-skip-automatic-zero-init-of-larg.patch [RHEL-95479] - kvm-hw-audio-ac97-skip-automatic-zero-init-of-large-arra.patch [RHEL-95479] - kvm-hw-audio-cs4231a-skip-automatic-zero-init-of-large-a.patch [RHEL-95479] - kvm-hw-audio-es1370-skip-automatic-zero-init-of-large-ar.patch [RHEL-95479] - kvm-hw-audio-gus-skip-automatic-zero-init-of-large-array.patch [RHEL-95479] - kvm-hw-audio-marvell_88w8618-skip-automatic-zero-init-of.patch [RHEL-95479] - kvm-hw-audio-sb16-skip-automatic-zero-init-of-large-arra.patch [RHEL-95479] - kvm-hw-audio-via-ac97-skip-automatic-zero-init-of-large-.patch [RHEL-95479] - kvm-hw-char-sclpconsole-lm-skip-automatic-zero-init-of-l.patch [RHEL-95479] - kvm-hw-dma-xlnx_csu_dma-skip-automatic-zero-init-of-larg.patch [RHEL-95479] - kvm-hw-display-vmware_vga-skip-automatic-zero-init-of-la.patch [RHEL-95479] - kvm-hw-hyperv-syndbg-skip-automatic-zero-init-of-large-a.patch [RHEL-95479] - kvm-hw-misc-aspeed_hace-skip-automatic-zero-init-of-larg.patch [RHEL-95479] - kvm-hw-net-rtl8139-skip-automatic-zero-init-of-large-arr.patch [RHEL-95479] - kvm-hw-net-tulip-skip-automatic-zero-init-of-large-array.patch [RHEL-95479] - kvm-hw-net-virtio-net-skip-automatic-zero-init-of-large-.patch [RHEL-95479] - kvm-hw-net-xgamc-skip-automatic-zero-init-of-large-array.patch [RHEL-95479] - kvm-hw-nvme-ctrl-skip-automatic-zero-init-of-large-array.patch [RHEL-95479] - kvm-hw-ppc-pnv_occ-skip-automatic-zero-init-of-large-str.patch [RHEL-95479] - kvm-hw-ppc-spapr_tpm_proxy-skip-automatic-zero-init-of-l.patch [RHEL-95479] - kvm-hw-usb-hcd-ohci-skip-automatic-zero-init-of-large-ar.patch [RHEL-95479] - kvm-hw-scsi-lsi53c895a-skip-automatic-zero-init-of-large.patch [RHEL-95479] - kvm-hw-scsi-megasas-skip-automatic-zero-init-of-large-ar.patch [RHEL-95479] - kvm-hw-ufs-lu-skip-automatic-zero-init-of-large-array.patch [RHEL-95479] - kvm-net-socket-skip-automatic-zero-init-of-large-array.patch [RHEL-95479] - kvm-net-stream-skip-automatic-zero-init-of-large-array.patch [RHEL-95479] - kvm-hw-i386-amd_iommu-Isolate-AMDVI-PCI-from-amd-iommu-d.patch [RHEL-85649] - kvm-hw-i386-amd_iommu-Allow-migration-when-explicitly-cr.patch [RHEL-85649] - kvm-Enable-amd-iommu-device.patch [RHEL-85649] - kvm-ui-vnc-Update-display-update-interval-when-VM-state-.patch [RHEL-83883] - Resolves: RHEL-98555 ([s390x][RHEL10.1][ccw-device] there would be memory leak with virtio_blk disks) - Resolves: RHEL-52650 ([AMDSERVER 10.1 Feature] Turin: Qemu EPYC-Turin Model) - Resolves: RHEL-95479 (-ftrivial-auto-var-init=zero reduced performance) - Resolves: RHEL-85649 ([RHEL 10]Qemu/amd-iommu: Add ability to manually specify the AMDVI-PCI device) - Resolves: RHEL-83883 (Video stuck after switchover phase when play one video during migration)
98 lines
3.3 KiB
Diff
98 lines
3.3 KiB
Diff
From d2ae6b7855efeb865f6a93db057378142ca172ea Mon Sep 17 00:00:00 2001
|
|
From: Juraj Marcin <jmarcin@redhat.com>
|
|
Date: Wed, 21 May 2025 17:16:13 +0200
|
|
Subject: [PATCH 43/43] ui/vnc: Update display update interval when VM state
|
|
changes to RUNNING
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
RH-Author: Juraj Marcin <None>
|
|
RH-MergeRequest: 384: ui/vnc: Update display update interval when VM state changes to RUNNING
|
|
RH-Jira: RHEL-83883
|
|
RH-Acked-by: Peter Xu <peterx@redhat.com>
|
|
RH-Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
RH-Commit: [1/1] 1231bccaeb9ea0ca78dd6fd53ba4b523f3bc569f (JurajMarcin/centos-src-qemu-kvm)
|
|
|
|
If a virtual machine is paused for an extended period time, for example,
|
|
due to an incoming migration, there are also no changes on the screen.
|
|
VNC in such case increases the display update interval by
|
|
VNC_REFRESH_INTERVAL_INC (50 ms). The update interval can then grow up
|
|
to VNC_REFRESH_INTERVAL_MAX (3000 ms).
|
|
|
|
When the machine resumes, it can then take up to 3 seconds for the first
|
|
display update. Furthermore, the update interval is then halved with
|
|
each display update with changes on the screen. If there are moving
|
|
elements on the screen, such as a video, this can be perceived as
|
|
freezing and stuttering for few seconds before the movement is smooth
|
|
again.
|
|
|
|
This patch resolves this issue, by adding a listener to VM state changes
|
|
and changing the update interval when the VM state changes to RUNNING.
|
|
The update_displaychangelistener() function updates the internal timer,
|
|
and the display is refreshed immediately if the timer is expired.
|
|
|
|
Signed-off-by: Juraj Marcin <jmarcin@redhat.com>
|
|
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
Reviewed-by: Peter Xu <peterx@redhat.com>
|
|
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
Link: https://lore.kernel.org/r/20250521151616.3951178-1-jmarcin@redhat.com
|
|
Signed-off-by: Peter Xu <peterx@redhat.com>
|
|
|
|
(cherry picked from commit 0310d594d98b39f9dde79b87fd8b0ad16e7c5459)
|
|
|
|
JIRA: https://issues.redhat.com/browse/RHEL-83883
|
|
|
|
Signed-off-by: Juraj Marcin <jmarcin@redhat.com>
|
|
---
|
|
ui/vnc.c | 12 ++++++++++++
|
|
ui/vnc.h | 2 ++
|
|
2 files changed, 14 insertions(+)
|
|
|
|
diff --git a/ui/vnc.c b/ui/vnc.c
|
|
index 9241caaad9..75fb1e74f0 100644
|
|
--- a/ui/vnc.c
|
|
+++ b/ui/vnc.c
|
|
@@ -3386,6 +3386,16 @@ static const DisplayChangeListenerOps dcl_ops = {
|
|
.dpy_cursor_define = vnc_dpy_cursor_define,
|
|
};
|
|
|
|
+static void vmstate_change_handler(void *opaque, bool running, RunState state)
|
|
+{
|
|
+ VncDisplay *vd = opaque;
|
|
+
|
|
+ if (state != RUN_STATE_RUNNING) {
|
|
+ return;
|
|
+ }
|
|
+ update_displaychangelistener(&vd->dcl, VNC_REFRESH_INTERVAL_BASE);
|
|
+}
|
|
+
|
|
void vnc_display_init(const char *id, Error **errp)
|
|
{
|
|
VncDisplay *vd;
|
|
@@ -3422,6 +3432,8 @@ void vnc_display_init(const char *id, Error **errp)
|
|
vd->dcl.ops = &dcl_ops;
|
|
register_displaychangelistener(&vd->dcl);
|
|
vd->kbd = qkbd_state_init(vd->dcl.con);
|
|
+ vd->vmstate_handler_entry = qemu_add_vm_change_state_handler(
|
|
+ &vmstate_change_handler, vd);
|
|
}
|
|
|
|
|
|
diff --git a/ui/vnc.h b/ui/vnc.h
|
|
index acc53a2cc1..3bb23acd34 100644
|
|
--- a/ui/vnc.h
|
|
+++ b/ui/vnc.h
|
|
@@ -185,6 +185,8 @@ struct VncDisplay
|
|
#endif
|
|
|
|
AudioState *audio_state;
|
|
+
|
|
+ VMChangeStateEntry *vmstate_handler_entry;
|
|
};
|
|
|
|
typedef struct VncTight {
|
|
--
|
|
2.39.3
|
|
|