[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 08/30] migration: Put the detection logic before auto-converge che
From: |
Juan Quintela |
Subject: |
[PULL 08/30] migration: Put the detection logic before auto-converge checking |
Date: |
Thu, 22 Jun 2023 04:12:58 +0200 |
From: Hyman Huang(黄勇) <yong.huang@smartx.com>
This commit is prepared for the implementation of dirty-limit
convergence algo.
The detection logic of throttling condition can apply to both
auto-converge and dirty-limit algo, putting it's position
before the checking logic for auto-converge feature.
Signed-off-by: Hyman Huang(黄勇) <yong.huang@smartx.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Message-ID: <168733225273.5845.15871826788879741674-6@git.sr.ht>
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
migration/ram.c | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/migration/ram.c b/migration/ram.c
index 78746849b5..b6559f9312 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -999,17 +999,18 @@ static void migration_trigger_throttle(RAMState *rs)
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
- we were in this routine reaches the threshold. If that happens
- twice, start or increase throttling. */
-
- if ((bytes_dirty_period > bytes_dirty_threshold) &&
- (++rs->dirty_rate_high_cnt >= 2)) {
+ /*
+ * 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
+ * we were in this routine reaches the threshold. If that happens
+ * twice, start or increase throttling.
+ */
+ if ((bytes_dirty_period > bytes_dirty_threshold) &&
+ (++rs->dirty_rate_high_cnt >= 2)) {
+ rs->dirty_rate_high_cnt = 0;
+ if (migrate_auto_converge()) {
trace_migration_throttle();
- rs->dirty_rate_high_cnt = 0;
mig_throttle_guest_down(bytes_dirty_period,
bytes_dirty_threshold);
}
--
2.40.1
- [PULL 00/30] Next patches, Juan Quintela, 2023/06/21
- [PULL 01/30] migration/multifd: Rename threadinfo.c functions, Juan Quintela, 2023/06/21
- [PULL 03/30] softmmu/dirtylimit: Add parameter check for hmp "set_vcpu_dirty_limit", Juan Quintela, 2023/06/21
- [PULL 02/30] migration/multifd: Protect accesses to migration_threads, Juan Quintela, 2023/06/21
- [PULL 04/30] qapi/migration: Introduce x-vcpu-dirty-limit-period parameter, Juan Quintela, 2023/06/21
- [PULL 05/30] qapi/migration: Introduce vcpu-dirty-limit parameters, Juan Quintela, 2023/06/21
- [PULL 06/30] migration: Introduce dirty-limit capability, Juan Quintela, 2023/06/21
- [PULL 07/30] migration: Refactor auto-converge capability logic, Juan Quintela, 2023/06/21
- [PULL 08/30] migration: Put the detection logic before auto-converge checking,
Juan Quintela <=
- [PULL 09/30] migration: Implement dirty-limit convergence algo, Juan Quintela, 2023/06/21
- [PULL 12/30] migration-test: Make machine_opts regular with other options, Juan Quintela, 2023/06/21
- [PULL 11/30] migration-test: Be consistent for ppc, Juan Quintela, 2023/06/21
- [PULL 13/30] migration-test: Create arch_opts, Juan Quintela, 2023/06/21
- [PULL 14/30] migration-test: machine_opts is really arch specific, Juan Quintela, 2023/06/21
- [PULL 18/30] migration-test: dirtylimit checks for x86_64 arch before, Juan Quintela, 2023/06/21
- [PULL 10/30] migration: Extend query-migrate to provide dirty page limit info, Juan Quintela, 2023/06/21
- [PULL 17/30] migration-test: Add bootfile_create/delete() functions, Juan Quintela, 2023/06/21
- [PULL 21/30] migration: Refactor repeated call of yank_unregister_instance, Juan Quintela, 2023/06/21
- [PULL 19/30] migration-test: simplify shmem_opts handling, Juan Quintela, 2023/06/21