From: Hyman Huang <yong.huang@smartx.com>
To: qemu-devel@nongnu.org
Cc: Peter Xu <peterx@redhat.com>, Fabiano Rosas <farosas@suse.de>,
Wei Wang <wei.w.wang@intel.com>,
David Hildenbrand <david@redhat.com>,
"Michael S . Tsirkin" <mst@redhat.com>,
yong.huang@smartx.com
Subject: [PATCH v1 1/2] virtio-balloon: Enable free page hinting during PRECOPY_NOTIFY_SETUP
Date: Sat, 9 Nov 2024 12:59:41 +0800 [thread overview]
Message-ID: <c799b1f96e55c5eb9c07e5a70a51b8ba67e7bcc9.1731128180.git.yong.huang@smartx.com> (raw)
In-Reply-To: <cover.1731128180.git.yong.huang@smartx.com>
PRECOPY_NOTIFY_AFTER_BITMAP_SYNC was interpreted by free page hinting
optimization as an indication to begin freeing pages. But there's no
assurance that a sync is required when beginning a migration. Therefore,
during PRECOPY_NOTIFY_SETUP, as well as PRECOPY_NOTIFY_AFTER_BITMAP_SYNC,
enable free page hinting.
Signed-off-by: Hyman Huang <yong.huang@smartx.com>
---
hw/virtio/virtio-balloon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c
index 609e39a821..2f1e086cd8 100644
--- a/hw/virtio/virtio-balloon.c
+++ b/hw/virtio/virtio-balloon.c
@@ -663,6 +663,7 @@ virtio_balloon_free_page_hint_notify(NotifierWithReturn *n, void *data,
case PRECOPY_NOTIFY_BEFORE_BITMAP_SYNC:
virtio_balloon_free_page_stop(dev);
break;
+ case PRECOPY_NOTIFY_SETUP:
case PRECOPY_NOTIFY_AFTER_BITMAP_SYNC:
if (vdev->vm_running) {
virtio_balloon_free_page_start(dev);
@@ -679,7 +680,6 @@ virtio_balloon_free_page_hint_notify(NotifierWithReturn *n, void *data,
*/
virtio_balloon_free_page_done(dev);
break;
- case PRECOPY_NOTIFY_SETUP:
case PRECOPY_NOTIFY_COMPLETE:
break;
default:
--
2.39.1
next prev parent reply other threads:[~2024-11-09 5:01 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-09 4:59 [PATCH v1 0/2] migration: Skip the first dirty sync Hyman Huang
2024-11-09 4:59 ` Hyman Huang [this message]
2024-11-12 10:10 ` [PATCH v1 1/2] virtio-balloon: Enable free page hinting during PRECOPY_NOTIFY_SETUP David Hildenbrand
2024-11-09 4:59 ` [PATCH v1 2/2] migration: Do not perform RAMBlock dirty sync during the first iteration Hyman Huang
2024-11-11 9:07 ` Wang, Wei W
2024-11-11 10:20 ` Yong Huang
2024-11-11 9:27 ` David Hildenbrand
2024-11-11 10:08 ` Yong Huang
2024-11-11 10:42 ` David Hildenbrand
2024-11-11 11:14 ` Yong Huang
2024-11-11 11:37 ` Yong Huang
2024-11-12 10:08 ` David Hildenbrand
2024-11-13 17:40 ` Peter Xu
2024-11-13 18:49 ` David Hildenbrand
2024-11-13 20:12 ` Peter Xu
2024-11-14 9:02 ` David Hildenbrand
2024-11-14 19:28 ` Peter Xu
2024-11-14 21:16 ` David Hildenbrand
2024-11-14 22:40 ` Peter Xu
2024-11-15 9:11 ` David Hildenbrand
2024-11-15 15:41 ` Peter Xu
2024-11-15 15:49 ` David Hildenbrand
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=c799b1f96e55c5eb9c07e5a70a51b8ba67e7bcc9.1731128180.git.yong.huang@smartx.com \
--to=yong.huang@smartx.com \
--cc=david@redhat.com \
--cc=farosas@suse.de \
--cc=mst@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=wei.w.wang@intel.com \
/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).