qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v18 7/7] softmmu/dirtylimit: Implement dirty page rate limit


From: Hyman Huang
Subject: Re: [PATCH v18 7/7] softmmu/dirtylimit: Implement dirty page rate limit
Date: Thu, 3 Mar 2022 20:14:40 +0800
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1



在 2022/3/3 20:02, Markus Armbruster 写道:
huangy81@chinatelecom.cn writes:

From: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>

Implement dirtyrate calculation periodically basing on
dirty-ring and throttle virtual CPU until it reachs the quota
dirty page rate given by user.

Introduce qmp commands "set-vcpu-dirty-limit",
"cancel-vcpu-dirty-limit", "query-vcpu-dirty-limit"
to enable, disable, query dirty page limit for virtual CPU.

Meanwhile, introduce corresponding hmp commands
"set_vcpu_dirty_limit", "cancel_vcpu_dirty_limit",
"info vcpu_dirty_limit" so the feature can be more usable.

"query-vcpu-dirty-limit" success depends on enabling dirty
page rate limit, so just add it to the list of skipped
command to ensure qmp-cmd-test run successfully.

Signed-off-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>
Acked-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
---
  hmp-commands-info.hx       |  13 +++
  hmp-commands.hx            |  32 ++++++++
  include/monitor/hmp.h      |   3 +
  qapi/migration.json        |  80 +++++++++++++++++++
  softmmu/dirtylimit.c       | 195 +++++++++++++++++++++++++++++++++++++++++++++
  tests/qtest/qmp-cmd-test.c |   2 +
  6 files changed, 325 insertions(+)

[...]

diff --git a/tests/qtest/qmp-cmd-test.c b/tests/qtest/qmp-cmd-test.c
index 7f103ea..4b216a0 100644
--- a/tests/qtest/qmp-cmd-test.c
+++ b/tests/qtest/qmp-cmd-test.c
@@ -110,6 +110,8 @@ static bool query_is_ignored(const char *cmd)
          "query-sev-capabilities",
          "query-sgx",
          "query-sgx-capabilities",
+        /* Success depends on enabling dirty page rate limit */
+        "query-vcpu-dirty-limit",
          NULL
      };
      int i;

The new command lacks test coverage.  Have you considered writing a
test?


Yes, test case is the next step after supporting dirty-ring-size option for guestperf tool. :)

cover.1646304624.git.huangy81@chinatelecom.cn/">https://lore.kernel.org/qemu-devel/cover.1646304624.git.huangy81@chinatelecom.cn/
--
Best regard

Hyman Huang(黄勇)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]