[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 3/3] hmp: add hmp for migrate_set_max_cpu_throttle
From: |
Li Qiang |
Subject: |
[Qemu-devel] [PATCH 3/3] hmp: add hmp for migrate_set_max_cpu_throttle |
Date: |
Tue, 31 Jul 2018 01:35:24 -0700 |
Signed-off-by: Li Qiang <address@hidden>
---
hmp-commands.hx | 14 ++++++++++++++
hmp.c | 6 ++++++
hmp.h | 1 +
3 files changed, 21 insertions(+)
diff --git a/hmp-commands.hx b/hmp-commands.hx
index 91dfe51c37..9d54ecbe4e 100644
--- a/hmp-commands.hx
+++ b/hmp-commands.hx
@@ -1042,6 +1042,20 @@ Set maximum speed to @var{value} (in bytes) for
migrations.
ETEXI
{
+ .name = "migrate_set_max_cpu_throttle",
+ .args_type = "value:i",
+ .params = "value",
+ .help = "set maximum cpu throttle for migrations.",
+ .cmd = hmp_migrate_set_max_cpu_throttle,
+ },
+
+STEXI
address@hidden hmp_migrate_set_max_cpu_throttle @var{value}
address@hidden migrate_set_max_cpu_throttle
+Set maximum cpu throttle to @var{value} for migrations.
+ETEXI
+
+ {
.name = "migrate_set_downtime",
.args_type = "value:T",
.params = "value",
diff --git a/hmp.c b/hmp.c
index 2aafb50e8e..4ee9af7165 100644
--- a/hmp.c
+++ b/hmp.c
@@ -1574,6 +1574,12 @@ void hmp_migrate_set_speed(Monitor *mon, const QDict
*qdict)
qmp_migrate_set_speed(value, NULL);
}
+void hmp_migrate_set_max_cpu_throttle(Monitor *mon, const QDict *qdict)
+{
+ int64_t value = qdict_get_int(qdict, "value");
+ qmp_migrate_set_max_cpu_throttle(value, NULL);
+}
+
void hmp_migrate_set_capability(Monitor *mon, const QDict *qdict)
{
const char *cap = qdict_get_str(qdict, "capability");
diff --git a/hmp.h b/hmp.h
index 33354f1bdd..e57f7e4005 100644
--- a/hmp.h
+++ b/hmp.h
@@ -73,6 +73,7 @@ void hmp_migrate_recover(Monitor *mon, const QDict *qdict);
void hmp_migrate_pause(Monitor *mon, const QDict *qdict);
void hmp_migrate_set_downtime(Monitor *mon, const QDict *qdict);
void hmp_migrate_set_speed(Monitor *mon, const QDict *qdict);
+void hmp_migrate_set_max_cpu_throttle(Monitor *mon, const QDict *qdict);
void hmp_migrate_set_capability(Monitor *mon, const QDict *qdict);
void hmp_migrate_set_parameter(Monitor *mon, const QDict *qdict);
void hmp_migrate_set_cache_size(Monitor *mon, const QDict *qdict);
--
2.11.0
- [Qemu-devel] [PATCH 0/3] Add a new migrate_set_max_cpu_throttle qmp command, Li Qiang, 2018/07/31
- [Qemu-devel] [PATCH 1/3] migrate: replace the cpu throttle percentage max with a variable, Li Qiang, 2018/07/31
- [Qemu-devel] [PATCH 2/3] migration: Add qmp command for migrate_set_max_cpu_throttle, Li Qiang, 2018/07/31
- Re: [Qemu-devel] [PATCH 2/3] migration: Add qmp command for migrate_set_max_cpu_throttle, Dr. David Alan Gilbert, 2018/07/31
- Re: [Qemu-devel] [PATCH 2/3] migration: Add qmp command for migrate_set_max_cpu_throttle, Eric Blake, 2018/07/31
- Re: [Qemu-devel] [PATCH 2/3] migration: Add qmp command for migrate_set_max_cpu_throttle, Juan Quintela, 2018/07/31
- Re: [Qemu-devel] [PATCH 2/3] migration: Add qmp command for migrate_set_max_cpu_throttle, Dr. David Alan Gilbert, 2018/07/31
- Re: [Qemu-devel] [PATCH 2/3] migration: Add qmp command for migrate_set_max_cpu_throttle, Daniel P . Berrangé, 2018/07/31
- Re: [Qemu-devel] [PATCH 2/3] migration: Add qmp command for migrate_set_max_cpu_throttle, Li Qiang, 2018/07/31
[Qemu-devel] [PATCH 3/3] hmp: add hmp for migrate_set_max_cpu_throttle,
Li Qiang <=