From: Li Qiang <liq3ea@gmail.com>
To: pbonzini@redhat.com, crosthwaite.peter@gmail.com,
rth@twiddle.net, quintela@redhat.com, dgilbert@redhat.com,
eblake@redhat.com, armbru@redhat.com
Cc: liqiang02@corp.netease.com, hzliuyingdong@corp.netease.com,
qemu-devel@nongnu.org, Li Qiang <liq3ea@gmail.com>
Subject: [Qemu-devel] [PATCH 3/3] hmp: add hmp for migrate_set_max_cpu_throttle
Date: Tue, 31 Jul 2018 01:35:24 -0700 [thread overview]
Message-ID: <1533026124-6740-4-git-send-email-liq3ea@gmail.com> (raw)
In-Reply-To: <1533026124-6740-1-git-send-email-liq3ea@gmail.com>
Signed-off-by: Li Qiang <liq3ea@gmail.com>
---
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
+@item hmp_migrate_set_max_cpu_throttle @var{value}
+@findex 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
prev parent reply other threads:[~2018-07-31 8:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-31 8:35 [Qemu-devel] [PATCH 0/3] Add a new migrate_set_max_cpu_throttle qmp command Li Qiang
2018-07-31 8:35 ` [Qemu-devel] [PATCH 1/3] migrate: replace the cpu throttle percentage max with a variable Li Qiang
2018-07-31 8:35 ` [Qemu-devel] [PATCH 2/3] migration: Add qmp command for migrate_set_max_cpu_throttle Li Qiang
2018-07-31 11:29 ` Dr. David Alan Gilbert
2018-07-31 12:22 ` Eric Blake
2018-07-31 14:48 ` Juan Quintela
2018-07-31 15:38 ` Dr. David Alan Gilbert
2018-07-31 15:50 ` Daniel P. Berrangé
2018-08-01 1:14 ` Li Qiang
2018-08-01 8:01 ` Juan Quintela
2018-07-31 8:35 ` Li Qiang [this message]
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=1533026124-6740-4-git-send-email-liq3ea@gmail.com \
--to=liq3ea@gmail.com \
--cc=armbru@redhat.com \
--cc=crosthwaite.peter@gmail.com \
--cc=dgilbert@redhat.com \
--cc=eblake@redhat.com \
--cc=hzliuyingdong@corp.netease.com \
--cc=liqiang02@corp.netease.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=rth@twiddle.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).