From: Avihai Horon <avihaih@nvidia.com>
To: <qemu-devel@nongnu.org>
Cc: "Alex Williamson" <alex.williamson@redhat.com>,
"Cédric Le Goater" <clg@redhat.com>,
"Peter Xu" <peterx@redhat.com>, "Fabiano Rosas" <farosas@suse.de>,
"Wang, Lei" <lei4.wang@intel.com>,
"Joao Martins" <joao.m.martins@oracle.com>,
"Avihai Horon" <avihaih@nvidia.com>
Subject: [PATCH v2 3/3] vfio/migration: Add a note about migration rate limiting
Date: Mon, 4 Mar 2024 12:53:39 +0200 [thread overview]
Message-ID: <20240304105339.20713-4-avihaih@nvidia.com> (raw)
In-Reply-To: <20240304105339.20713-1-avihaih@nvidia.com>
VFIO migration buffer size is currently limited to 1MB. Therefore, there
is no need to check if migration rate exceeded, as in the worst case it
will exceed by only 1MB.
However, if the buffer size is later changed to a bigger value,
vfio_save_iterate() should enforce migration rate (similar to migration
RAM code).
Add a note about this in vfio_save_iterate() to serve as a reminder.
Suggested-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Avihai Horon <avihaih@nvidia.com>
---
hw/vfio/migration.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/hw/vfio/migration.c b/hw/vfio/migration.c
index 0af783a5892..f82dcabc49a 100644
--- a/hw/vfio/migration.c
+++ b/hw/vfio/migration.c
@@ -505,6 +505,12 @@ static bool vfio_is_active_iterate(void *opaque)
return vfio_device_state_is_precopy(vbasedev);
}
+/*
+ * Note about migration rate limiting: VFIO migration buffer size is currently
+ * limited to 1MB, so there is no need to check if migration rate exceeded (as
+ * in the worst case it will exceed by 1MB). However, if the buffer size is
+ * later changed to a bigger value, migration rate should be enforced here.
+ */
static int vfio_save_iterate(QEMUFile *f, void *opaque)
{
VFIODevice *vbasedev = opaque;
--
2.26.3
next prev parent reply other threads:[~2024-03-04 10:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-04 10:53 [PATCH v2 0/3] migration: Don't serialize devices in qemu_savevm_state_iterate() Avihai Horon
2024-03-04 10:53 ` [PATCH v2 1/3] " Avihai Horon
2024-03-04 10:53 ` [PATCH v2 2/3] vfio/migration: Refactor vfio_save_state() return value Avihai Horon
2024-03-04 10:53 ` Avihai Horon [this message]
2024-03-04 20:36 ` [PATCH v2 0/3] migration: Don't serialize devices in qemu_savevm_state_iterate() Fabiano Rosas
2024-03-05 2:24 ` 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=20240304105339.20713-4-avihaih@nvidia.com \
--to=avihaih@nvidia.com \
--cc=alex.williamson@redhat.com \
--cc=clg@redhat.com \
--cc=farosas@suse.de \
--cc=joao.m.martins@oracle.com \
--cc=lei4.wang@intel.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).