All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert (git)" <dgilbert@redhat.com>
To: qemu-devel@nongnu.org, leobras@redhat.com, quintela@redhat.com,
	berrange@redhat.com, peterx@redhat.com, iii@linux.ibm.com,
	huangy81@chinatelecom.cn
Subject: [PULL 05/30] accel/kvm/kvm-all: Introduce kvm_dirty_ring_size function
Date: Wed, 20 Jul 2022 12:19:01 +0100	[thread overview]
Message-ID: <20220720111926.107055-6-dgilbert@redhat.com> (raw)
In-Reply-To: <20220720111926.107055-1-dgilbert@redhat.com>

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



  parent reply	other threads:[~2022-07-20 11:25 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-20 11:18 [PULL 00/30] migration queue Dr. David Alan Gilbert (git)
2022-07-20 11:18 ` [PULL 01/30] accel/kvm/kvm-all: Refactor per-vcpu dirty ring reaping Dr. David Alan Gilbert (git)
2022-07-20 11:18 ` [PULL 02/30] cpus: Introduce cpu_list_generation_id Dr. David Alan Gilbert (git)
2022-07-20 11:18 ` [PULL 03/30] migration/dirtyrate: Refactor dirty page rate calculation Dr. David Alan Gilbert (git)
2022-07-20 11:19 ` [PULL 04/30] softmmu/dirtylimit: Implement vCPU dirtyrate calculation periodically Dr. David Alan Gilbert (git)
2022-07-20 11:19 ` Dr. David Alan Gilbert (git) [this message]
2022-07-20 11:19 ` [PULL 06/30] softmmu/dirtylimit: Implement virtual CPU throttle Dr. David Alan Gilbert (git)
2022-07-29 13:31   ` Peter Maydell
2022-07-29 14:14     ` Richard Henderson
2022-07-29 15:14       ` Hyman
2022-07-20 11:19 ` [PULL 07/30] softmmu/dirtylimit: Implement dirty page rate limit Dr. David Alan Gilbert (git)
2022-07-20 11:19 ` [PULL 08/30] tests: Add dirty page rate limit test Dr. David Alan Gilbert (git)
2022-08-01 10:41   ` migration test fails for aarch64 target (was: Re: [PULL 08/30] tests: Add dirty page rate limit test) Thomas Huth
2022-08-01 11:20     ` Peter Maydell
2022-07-20 11:19 ` [PULL 09/30] multifd: Copy pages before compressing them with zlib Dr. David Alan Gilbert (git)
2022-07-20 11:19 ` [PULL 10/30] migration: Add postcopy-preempt capability Dr. David Alan Gilbert (git)
2022-07-20 11:19 ` [PULL 11/30] migration: Postcopy preemption preparation on channel creation Dr. David Alan Gilbert (git)
2022-07-20 11:19 ` [PULL 12/30] migration: Postcopy preemption enablement Dr. David Alan Gilbert (git)
2022-07-20 11:19 ` [PULL 13/30] migration: Postcopy recover with preempt enabled Dr. David Alan Gilbert (git)
2022-07-20 11:19 ` [PULL 14/30] migration: Create the postcopy preempt channel asynchronously Dr. David Alan Gilbert (git)
2022-07-20 11:19 ` [PULL 15/30] migration: Add property x-postcopy-preempt-break-huge Dr. David Alan Gilbert (git)
2022-07-20 11:19 ` [PULL 16/30] migration: Add helpers to detect TLS capability Dr. David Alan Gilbert (git)
2022-07-20 11:19 ` [PULL 17/30] migration: Export tls-[creds|hostname|authz] params to cmdline too Dr. David Alan Gilbert (git)
2022-07-20 11:19 ` [PULL 18/30] migration: Enable TLS for preempt channel Dr. David Alan Gilbert (git)
2022-07-20 11:19 ` [PULL 19/30] migration: Respect postcopy request order in preemption mode Dr. David Alan Gilbert (git)
2022-07-20 11:19 ` [PULL 20/30] tests: Move MigrateCommon upper Dr. David Alan Gilbert (git)
2022-07-20 11:19 ` [PULL 21/30] tests: Add postcopy tls migration test Dr. David Alan Gilbert (git)
2022-07-20 11:19 ` [PULL 22/30] tests: Add postcopy tls recovery " Dr. David Alan Gilbert (git)
2022-07-20 11:19 ` [PULL 23/30] tests: Add postcopy preempt tests Dr. David Alan Gilbert (git)
2022-07-20 11:19 ` [PULL 24/30] migration: remove unreachable code after reading data Dr. David Alan Gilbert (git)
2022-07-20 11:19 ` [PULL 25/30] QIOChannelSocket: Fix zero-copy flush returning code 1 when nothing sent Dr. David Alan Gilbert (git)
2022-07-20 11:19 ` [PULL 26/30] Add dirty-sync-missed-zero-copy migration stat Dr. David Alan Gilbert (git)
2022-07-20 11:19 ` [PULL 27/30] migration/multifd: Report to user when zerocopy not working Dr. David Alan Gilbert (git)
2022-07-20 11:19 ` [PULL 28/30] multifd: Document the locking of MultiFD{Send/Recv}Params Dr. David Alan Gilbert (git)
2022-07-20 11:19 ` [PULL 29/30] migration: Avoid false-positive on non-supported scenarios for zero-copy-send Dr. David Alan Gilbert (git)
2022-07-20 11:19 ` [PULL 30/30] Revert "gitlab: disable accelerated zlib for s390x" Dr. David Alan Gilbert (git)
2022-07-21 10:11 ` [PULL 00/30] migration queue Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220720111926.107055-6-dgilbert@redhat.com \
    --to=dgilbert@redhat.com \
    --cc=berrange@redhat.com \
    --cc=huangy81@chinatelecom.cn \
    --cc=iii@linux.ibm.com \
    --cc=leobras@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.