[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH QEMU v6 6/9] migration: Put the detection logic before auto-conve
From: |
~hyman |
Subject: |
[PATCH QEMU v6 6/9] migration: Put the detection logic before auto-converge checking |
Date: |
Thu, 15 Jun 2023 21:29:44 +0800 |
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>
---
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.38.5
- [PATCH QEMU v6 0/9] migration: introduce dirtylimit capability, ~hyman, 2023/06/21
- [PATCH QEMU v6 4/9] migration: Introduce dirty-limit capability, ~hyman, 2023/06/21
- [PATCH QEMU v6 3/9] qapi/migration: Introduce vcpu-dirty-limit parameters, ~hyman, 2023/06/21
- [PATCH QEMU v6 6/9] migration: Put the detection logic before auto-converge checking,
~hyman <=
- [PATCH QEMU v6 7/9] migration: Implement dirty-limit convergence algo, ~hyman, 2023/06/21
- [PATCH QEMU v6 2/9] qapi/migration: Introduce x-vcpu-dirty-limit-period parameter, ~hyman, 2023/06/21
- [PATCH QEMU v6 1/9] softmmu/dirtylimit: Add parameter check for hmp "set_vcpu_dirty_limit", ~hyman, 2023/06/21
- [PATCH QEMU v6 5/9] migration: Refactor auto-converge capability logic, ~hyman, 2023/06/21
- [PATCH QEMU v6 8/9] migration: Extend query-migrate to provide dirty page limit info, ~hyman, 2023/06/21
- [PATCH QEMU v6 9/9] tests: Add migration dirty-limit capability test, ~hyman, 2023/06/21