[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 07/10] migration: Refactor auto-converge capability logic
From: |
huangy81 |
Subject: |
[PATCH v4 07/10] migration: Refactor auto-converge capability logic |
Date: |
Fri, 17 Feb 2023 00:18:36 +0800 |
From: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>
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(黄勇) <huangy81@chinatelecom.cn>
Acked-by: Peter Xu <peterx@redhat.com>
---
migration/ram.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/migration/ram.c b/migration/ram.c
index 521912385d..3e5dff4068 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -1200,7 +1200,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.17.1
- [PATCH v4 00/10] migration: introduce dirtylimit capability, huangy81, 2023/02/16
- [PATCH v4 01/10] dirtylimit: Fix overflow when computing MB, huangy81, 2023/02/16
- [PATCH v4 02/10] softmmu/dirtylimit: Add parameter check for hmp "set_vcpu_dirty_limit", huangy81, 2023/02/16
- [PATCH v4 03/10] kvm: dirty-ring: Fix race with vcpu creation, huangy81, 2023/02/16
- [PATCH v4 04/10] qapi/migration: Introduce x-vcpu-dirty-limit-period parameter, huangy81, 2023/02/16
- [PATCH v4 07/10] migration: Refactor auto-converge capability logic,
huangy81 <=
- [PATCH v4 06/10] migration: Introduce dirty-limit capability, huangy81, 2023/02/16
- [PATCH v4 05/10] qapi/migration: Introduce vcpu-dirty-limit parameters, huangy81, 2023/02/16
- [PATCH v4 08/10] migration: Implement dirty-limit convergence algo, huangy81, 2023/02/16
- [PATCH v4 10/10] tests: Add migration dirty-limit capability test, huangy81, 2023/02/16
- [PATCH v4 09/10] migration: Extend query-migrate to provide dirty page limit info, huangy81, 2023/02/16