[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v10 3/3] cpus-common: implement dirty page limit on virtual C
From: |
Markus Armbruster |
Subject: |
Re: [PATCH v10 3/3] cpus-common: implement dirty page limit on virtual CPU |
Date: |
Wed, 15 Dec 2021 08:37:03 +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 "vcpu-dirty-limit", "query-vcpu-dirty-limit"
> to enable, disable, query dirty page limit for virtual CPU.
>
> Meanwhile, introduce corresponding hmp commands "vcpu_dirty_limit",
> "info vcpu_dirty_limit" so developers can play with them easier.
>
> Signed-off-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>
[...]
> diff --git a/include/monitor/hmp.h b/include/monitor/hmp.h
> index 96d0148..04879a2 100644
> --- a/include/monitor/hmp.h
> +++ b/include/monitor/hmp.h
> @@ -131,6 +131,8 @@ void hmp_replay_delete_break(Monitor *mon, const QDict
> *qdict);
> void hmp_replay_seek(Monitor *mon, const QDict *qdict);
> void hmp_info_dirty_rate(Monitor *mon, const QDict *qdict);
> void hmp_calc_dirty_rate(Monitor *mon, const QDict *qdict);
> +void hmp_info_vcpu_dirty_limit(Monitor *mon, const QDict *qdict);
> +void hmp_vcpu_dirty_limit(Monitor *mon, const QDict *qdict);
> void hmp_human_readable_text_helper(Monitor *mon,
> HumanReadableText *(*qmp_handler)(Error
> **));
>
> diff --git a/qapi/migration.json b/qapi/migration.json
> index ac5fa56..7d8da4f 100644
> --- a/qapi/migration.json
> +++ b/qapi/migration.json
> @@ -1869,6 +1869,50 @@
> 'current-rate': 'int64' } }
>
> ##
> +# @vcpu-dirty-limit:
> +#
> +# Set or cancel the upper limit of dirty page rate for a virtual CPU.
> +#
> +# Requires KVM with accelerator property "dirty-ring-size" set.
> +# A virtual CPU's dirty page rate is a measure of its memory load.
> +# To observe dirty page rates, use @calc-dirty-rate.
> +#
> +# @enable: true to enable, false to disable.
> +#
> +# @cpu-index: index of virtual CPU, default is all.
Suggest
# @cpu-index: The vCPU to act upon (all by default).
(I'm stealing this from trace.json)
> +#
> +# @dirty-rate: upper limit of dirty page rate for virtual CPU, to
> +# cancel dirty limit, this field will be ignored.
> +#
> +# Since: 7.0
> +#
> +# Example:
> +# {"execute": "vcpu-dirty-limit"}
> +# "arguments": { "enable": true,
> +# "cpu-index": 1,
> +# "dirty-rate": 200 } }
> +#
> +##
> +{ 'command': 'vcpu-dirty-limit',
> + 'data': { 'enable': 'bool',
> + '*cpu-index': 'uint64',
> + '*dirty-rate': 'uint64'} }
Drop @enable, please.
If @dirty-rate is present, set the limit to its value.
If it's absent, cancel the limit.
> +
> +##
> +# @query-vcpu-dirty-limit:
> +#
> +# Returns information about all virtual CPU dirty limit if enabled.
> +#
> +# Since: 7.0
> +#
> +# Example:
> +# {"execute": "query-vcpu-dirty-limit"}
> +#
> +##
> +{ 'command': 'query-vcpu-dirty-limit',
> + 'returns': [ 'DirtyLimitInfo' ] }
> +
> +##
> # @snapshot-save:
> #
> # Save a VM snapshot
- [PATCH v10 0/3] support dirty restraint on vCPU, huangy81, 2021/12/14
- [PATCH v10 2/3] cpu-throttle: implement virtual CPU throttle, huangy81, 2021/12/14
- [PATCH v10 1/3] migration/dirtyrate: implement vCPU dirtyrate calculation periodically, huangy81, 2021/12/14
- [PATCH v10 3/3] cpus-common: implement dirty page limit on virtual CPU, huangy81, 2021/12/14
- Re: [PATCH v10 3/3] cpus-common: implement dirty page limit on virtual CPU,
Markus Armbruster <=
- Re: [PATCH v10 3/3] cpus-common: implement dirty page limit on virtual CPU, Markus Armbruster, 2021/12/15
- Re: [PATCH v10 3/3] cpus-common: implement dirty page limit on virtual CPU, Peter Xu, 2021/12/16
- Re: [PATCH v10 3/3] cpus-common: implement dirty page limit on virtual CPU, Hyman Huang, 2021/12/16
- Re: [PATCH v10 3/3] cpus-common: implement dirty page limit on virtual CPU, Markus Armbruster, 2021/12/16
- Re: [PATCH v10 3/3] cpus-common: implement dirty page limit on virtual CPU, Peter Xu, 2021/12/24
Re: [PATCH v10 3/3] cpus-common: implement dirty page limit on virtual CPU, Peter Xu, 2021/12/24