[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH QEMU v9 5/9] migration: Refactor auto-converge capability logic
From: |
~hyman |
Subject: |
[PATCH QEMU v9 5/9] migration: Refactor auto-converge capability logic |
Date: |
Thu, 20 Jul 2023 16:22:11 -0000 |
From: Hyman Huang(黄勇) <yong.huang@smartx.com>
Check if block migration is running before throttling
guest down in auto-converge way.
Note that this modification is kind of like code clean,
because block migration does not depend on auto-converge
capability, so the order of checks can be adjusted.
Signed-off-by: Hyman Huang(黄勇) <yong.huang@smartx.com>
Acked-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
---
migration/ram.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/migration/ram.c b/migration/ram.c
index 0ada6477e8..f31de47a47 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -995,7 +995,11 @@ static void migration_trigger_throttle(RAMState *rs)
/* During block migration the auto-converge logic incorrectly detects
* that ram migration makes no progress. Avoid this by disabling the
* throttling logic during the bulk phase of block migration. */
- if (migrate_auto_converge() && !blk_mig_bulk_active()) {
+ if (blk_mig_bulk_active()) {
+ return;
+ }
+
+ if (migrate_auto_converge()) {
/* The following detection logic can be refined later. For now:
Check to see if the ratio between dirtied bytes and the approx.
amount of bytes that just got transferred since the last time
--
2.38.5
- [PATCH QEMU v9 0/9] migration: introduce dirtylimit capability, ~hyman, 2023/07/20
- [PATCH QEMU v9 1/9] softmmu/dirtylimit: Add parameter check for hmp "set_vcpu_dirty_limit", ~hyman, 2023/07/20
- [PATCH QEMU v9 7/9] migration: Implement dirty-limit convergence algorithm, ~hyman, 2023/07/20
- [PATCH QEMU v9 4/9] migration: Introduce dirty-limit capability, ~hyman, 2023/07/20
- [PATCH QEMU v9 3/9] qapi/migration: Introduce vcpu-dirty-limit parameters, ~hyman, 2023/07/20
- [PATCH QEMU v9 9/9] tests: Add migration dirty-limit capability test, ~hyman, 2023/07/20
- [PATCH QEMU v9 5/9] migration: Refactor auto-converge capability logic,
~hyman <=
- [PATCH QEMU v9 6/9] migration: Put the detection logic before auto-converge checking, ~hyman, 2023/07/20
- [PATCH QEMU v9 2/9] qapi/migration: Introduce x-vcpu-dirty-limit-period parameter, ~hyman, 2023/07/20
- [PATCH QEMU v9 8/9] migration: Extend query-migrate to provide dirty-limit info, ~hyman, 2023/07/20