[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 05/29] accel/kvm/kvm-all: Introduce kvm_dirty_ring_size function
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[PULL 05/29] accel/kvm/kvm-all: Introduce kvm_dirty_ring_size function |
Date: |
Tue, 19 Jul 2022 18:01:57 +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:
<f9ce1f550bfc0e3a1f711e17b1dbc8f701700e56.1656177590.git.huangy81@chinatelecom.cn>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
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 ce989a68ff..184aecab5c 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
- [PULL 01/29] accel/kvm/kvm-all: Refactor per-vcpu dirty ring reaping, (continued)
- [PULL 01/29] accel/kvm/kvm-all: Refactor per-vcpu dirty ring reaping, Dr. David Alan Gilbert (git), 2022/07/19
- [PULL 04/29] softmmu/dirtylimit: Implement vCPU dirtyrate calculation periodically, Dr. David Alan Gilbert (git), 2022/07/19
- [PULL 02/29] cpus: Introduce cpu_list_generation_id, Dr. David Alan Gilbert (git), 2022/07/19
- [PULL 08/29] tests: Add dirty page rate limit test, Dr. David Alan Gilbert (git), 2022/07/19
- [PULL 06/29] softmmu/dirtylimit: Implement virtual CPU throttle, Dr. David Alan Gilbert (git), 2022/07/19
- [PULL 09/29] multifd: Copy pages before compressing them with zlib, Dr. David Alan Gilbert (git), 2022/07/19
- [PULL 07/29] softmmu/dirtylimit: Implement dirty page rate limit, Dr. David Alan Gilbert (git), 2022/07/19
- [PULL 11/29] migration: Postcopy preemption preparation on channel creation, Dr. David Alan Gilbert (git), 2022/07/19
- [PULL 17/29] migration: Export tls-[creds|hostname|authz] params to cmdline too, Dr. David Alan Gilbert (git), 2022/07/19
- [PULL 13/29] migration: Postcopy recover with preempt enabled, Dr. David Alan Gilbert (git), 2022/07/19
- [PULL 05/29] accel/kvm/kvm-all: Introduce kvm_dirty_ring_size function,
Dr. David Alan Gilbert (git) <=
- [PULL 16/29] migration: Add helpers to detect TLS capability, Dr. David Alan Gilbert (git), 2022/07/19
- [PULL 12/29] migration: Postcopy preemption enablement, Dr. David Alan Gilbert (git), 2022/07/19
- [PULL 14/29] migration: Create the postcopy preempt channel asynchronously, Dr. David Alan Gilbert (git), 2022/07/19
- [PULL 23/29] tests: Add postcopy preempt tests, Dr. David Alan Gilbert (git), 2022/07/19
- [PULL 19/29] migration: Respect postcopy request order in preemption mode, Dr. David Alan Gilbert (git), 2022/07/19
- [PULL 28/29] multifd: Document the locking of MultiFD{Send/Recv}Params, Dr. David Alan Gilbert (git), 2022/07/19
- [PULL 24/29] migration: remove unreachable code after reading data, Dr. David Alan Gilbert (git), 2022/07/19
- [PULL 29/29] migration: Avoid false-positive on non-supported scenarios for zero-copy-send, Dr. David Alan Gilbert (git), 2022/07/19
- [PULL 22/29] tests: Add postcopy tls recovery migration test, Dr. David Alan Gilbert (git), 2022/07/19
- [PULL 27/29] migration/multifd: Report to user when zerocopy not working, Dr. David Alan Gilbert (git), 2022/07/19