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: Markus Armbruster
Subject: Re: [PATCH v18 7/7] softmmu/dirtylimit: Implement dirty page rate limit
Date: Thu, 03 Mar 2022 13:02:33 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

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?




reply via email to

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