[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 30/33] accel/kvm/kvm-all: Introduce kvm_dirty_ring_size function
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[PULL 30/33] accel/kvm/kvm-all: Introduce kvm_dirty_ring_size function |
Date: |
Wed, 22 Jun 2022 19:39:14 +0100 |
From: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>
Introduce kvm_dirty_ring_size util function to help calculate
dirty ring ful time.
Signed-off-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>
Acked-by: Peter Xu <peterx@redhat.com>
Message-Id:
<c99e7851c2e2b99312cfbabe4d1f6379a3da8a44.1652931128.git.huangy81@chinatelecom.cn>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
dgilbert: Fixed up excess #endif
---
accel/kvm/kvm-all.c | 5 +++++
accel/stubs/kvm-stub.c | 5 +++++
include/sysemu/kvm.h | 2 ++
3 files changed, 12 insertions(+)
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
index 672ed004ab..59b8ea1a05 100644
--- a/accel/kvm/kvm-all.c
+++ b/accel/kvm/kvm-all.c
@@ -2318,6 +2318,11 @@ static void query_stats_cb(StatsResultList **result,
StatsTarget target,
strList *names, strList *targets, Error **errp);
static void query_stats_schemas_cb(StatsSchemaList **result, Error **errp);
+uint32_t kvm_dirty_ring_size(void)
+{
+ return kvm_state->kvm_dirty_ring_size;
+}
+
static int kvm_init(MachineState *ms)
{
MachineClass *mc = MACHINE_GET_CLASS(ms);
diff --git a/accel/stubs/kvm-stub.c b/accel/stubs/kvm-stub.c
index 3345882d85..2ac5f9c036 100644
--- a/accel/stubs/kvm-stub.c
+++ b/accel/stubs/kvm-stub.c
@@ -148,3 +148,8 @@ bool kvm_dirty_ring_enabled(void)
{
return false;
}
+
+uint32_t kvm_dirty_ring_size(void)
+{
+ return 0;
+}
diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h
index a783c78868..efd6dee818 100644
--- a/include/sysemu/kvm.h
+++ b/include/sysemu/kvm.h
@@ -582,4 +582,6 @@ bool kvm_cpu_check_are_resettable(void);
bool kvm_arch_cpu_check_are_resettable(void);
bool kvm_dirty_ring_enabled(void);
+
+uint32_t kvm_dirty_ring_size(void);
#endif
--
2.36.1
- Re: [PULL 22/33] migration: remove the QEMUFileOps 'get_buffer' callback, (continued)
[PULL 29/33] softmmu/dirtylimit: Implement vCPU dirtyrate calculation periodically, Dr. David Alan Gilbert (git), 2022/06/22
[PULL 31/33] softmmu/dirtylimit: Implement virtual CPU throttle, Dr. David Alan Gilbert (git), 2022/06/22
[PULL 33/33] tests: Add dirty page rate limit test, Dr. David Alan Gilbert (git), 2022/06/22
[PULL 20/33] migration: remove the QEMUFileOps 'set_blocking' callback, Dr. David Alan Gilbert (git), 2022/06/22
[PULL 26/33] accel/kvm/kvm-all: Refactor per-vcpu dirty ring reaping, Dr. David Alan Gilbert (git), 2022/06/22
[PULL 32/33] softmmu/dirtylimit: Implement dirty page rate limit, Dr. David Alan Gilbert (git), 2022/06/22
[PULL 25/33] migration: remove the QEMUFileOps abstraction, Dr. David Alan Gilbert (git), 2022/06/22
[PULL 21/33] migration: remove the QEMUFileOps 'close' callback, Dr. David Alan Gilbert (git), 2022/06/22
[PULL 30/33] accel/kvm/kvm-all: Introduce kvm_dirty_ring_size function,
Dr. David Alan Gilbert (git) <=
[PULL 28/33] migration/dirtyrate: Refactor dirty page rate calculation, Dr. David Alan Gilbert (git), 2022/06/22
[PULL 27/33] cpus: Introduce cpu_list_generation_id, Dr. David Alan Gilbert (git), 2022/06/22
Re: [PULL 00/33] migration queue, Dr. David Alan Gilbert, 2022/06/23
[PULL 00/33] migration queue, Dr. David Alan Gilbert (git), 2022/06/23
- [PULL 01/33] migration: Remove RDMA_UNREGISTRATION_EXAMPLE, Dr. David Alan Gilbert (git), 2022/06/23
- [PULL 02/33] QIOChannelSocket: Introduce assert and reduce ifdefs to improve readability, Dr. David Alan Gilbert (git), 2022/06/23
- [PULL 03/33] QIOChannelSocket: Fix zero-copy send so socket flush works, Dr. David Alan Gilbert (git), 2022/06/23
- [PULL 05/33] io: add a QIOChannelNull equivalent to /dev/null, Dr. David Alan Gilbert (git), 2022/06/23
- [PULL 06/33] migration: switch to use QIOChannelNull for dummy channel, Dr. David Alan Gilbert (git), 2022/06/23
- [PULL 08/33] migration: rename rate limiting fields in QEMUFile, Dr. David Alan Gilbert (git), 2022/06/23