[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 21/34] migration: export vcpu_dirty_limit_period
From: |
peterx |
Subject: |
[PULL 21/34] migration: export vcpu_dirty_limit_period |
Date: |
Mon, 11 Mar 2024 17:59:12 -0400 |
From: Steve Sistare <steven.sistare@oracle.com>
Define and export vcpu_dirty_limit_period to eliminate a dependency
on MigrationState.
Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Link:
1710179338-294359-6-git-send-email-steven.sistare@oracle.com">https://lore.kernel.org/r/1710179338-294359-6-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>
---
include/migration/client-options.h | 1 +
migration/options.c | 7 +++++++
system/dirtylimit.c | 3 +--
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/include/migration/client-options.h
b/include/migration/client-options.h
index 887fea1565..59f4b55cf4 100644
--- a/include/migration/client-options.h
+++ b/include/migration/client-options.h
@@ -20,5 +20,6 @@ bool migrate_switchover_ack(void);
/* parameters */
MigMode migrate_mode(void);
+uint64_t migrate_vcpu_dirty_limit_period(void);
#endif
diff --git a/migration/options.c b/migration/options.c
index 642cfb00a3..09178c6f60 100644
--- a/migration/options.c
+++ b/migration/options.c
@@ -924,6 +924,13 @@ const char *migrate_tls_hostname(void)
return s->parameters.tls_hostname;
}
+uint64_t migrate_vcpu_dirty_limit_period(void)
+{
+ MigrationState *s = migrate_get_current();
+
+ return s->parameters.x_vcpu_dirty_limit_period;
+}
+
uint64_t migrate_xbzrle_cache_size(void)
{
MigrationState *s = migrate_get_current();
diff --git a/system/dirtylimit.c b/system/dirtylimit.c
index 1622bb7426..b0afaa0776 100644
--- a/system/dirtylimit.c
+++ b/system/dirtylimit.c
@@ -77,14 +77,13 @@ static bool dirtylimit_quit;
static void vcpu_dirty_rate_stat_collect(void)
{
- MigrationState *s = migrate_get_current();
VcpuStat stat;
int i = 0;
int64_t period = DIRTYLIMIT_CALC_TIME_MS;
if (migrate_dirty_limit() &&
migration_is_active()) {
- period = s->parameters.x_vcpu_dirty_limit_period;
+ period = migrate_vcpu_dirty_limit_period();
}
/* calculate vcpu dirtyrate */
--
2.44.0
- [PULL 11/34] physmem: Rename addr1 to more informative mr_addr in flatview_read/write() and similar, (continued)
- [PULL 11/34] physmem: Rename addr1 to more informative mr_addr in flatview_read/write() and similar, peterx, 2024/03/11
- [PULL 13/34] physmem: Factor out body of flatview_read/write_continue() loop, peterx, 2024/03/11
- [PULL 12/34] physmem: Reduce local variable scope in flatview_read/write_continue(), peterx, 2024/03/11
- [PULL 16/34] migration: export fewer options, peterx, 2024/03/11
- [PULL 14/34] physmem: Fix wrong address in large address_space_read/write_cached_slow(), peterx, 2024/03/11
- [PULL 27/34] migration: purge MigrationState from public interface, peterx, 2024/03/11
- [PULL 29/34] migration/multifd: Allow clearing of the file_bmap from multifd, peterx, 2024/03/11
- [PULL 34/34] migration/multifd: Add new migration test cases for legacy zero page checking., peterx, 2024/03/11
- [PULL 18/34] migration: export migration_is_setup_or_active, peterx, 2024/03/11
- [PULL 17/34] migration: remove migration.h references, peterx, 2024/03/11
- [PULL 21/34] migration: export vcpu_dirty_limit_period,
peterx <=
- [PULL 15/34] migration: Fix format in error message, peterx, 2024/03/11
- [PULL 19/34] migration: export migration_is_active, peterx, 2024/03/11
- [PULL 20/34] migration: export migration_is_running, peterx, 2024/03/11
- [PULL 23/34] migration: migration_is_device, peterx, 2024/03/11
- [PULL 22/34] migration: migration_thread_is_self, peterx, 2024/03/11
- [PULL 25/34] migration: privatize colo interfaces, peterx, 2024/03/11
- [PULL 26/34] migration: delete unused accessors, peterx, 2024/03/11
- [PULL 28/34] migration/multifd: Allow zero pages in file migration, peterx, 2024/03/11
- [PULL 24/34] migration: migration_file_set_error, peterx, 2024/03/11
- [PULL 30/34] migration/multifd: Add new migration option zero-page-detection., peterx, 2024/03/11