From patchwork Tue Jan 3 15:34:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Orit Wasserman X-Patchwork-Id: 134026 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 92601B6F9B for ; Wed, 4 Jan 2012 02:45:43 +1100 (EST) Received: from localhost ([::1]:52963 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ri6Pk-00086D-C7 for incoming@patchwork.ozlabs.org; Tue, 03 Jan 2012 10:36:36 -0500 Received: from eggs.gnu.org ([140.186.70.92]:34623) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ri6Ov-00063i-UU for qemu-devel@nongnu.org; Tue, 03 Jan 2012 10:35:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ri6Ou-0006zr-JJ for qemu-devel@nongnu.org; Tue, 03 Jan 2012 10:35:45 -0500 Received: from mx1.redhat.com ([209.132.183.28]:21522) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ri6Ou-0006zd-Ai for qemu-devel@nongnu.org; Tue, 03 Jan 2012 10:35:44 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q03FZgHu024303 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 3 Jan 2012 10:35:42 -0500 Received: from dhcp-1-120.tlv.redhat.com (vpn-202-200.tlv.redhat.com [10.35.202.200]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q03FZNo3003527; Tue, 3 Jan 2012 10:35:41 -0500 From: Orit Wasserman To: qemu-devel@nongnu.org Date: Tue, 3 Jan 2012 17:34:38 +0200 Message-Id: <1325604879-15862-9-git-send-email-owasserm@redhat.com> In-Reply-To: <1325604879-15862-1-git-send-email-owasserm@redhat.com> References: <1325604879-15862-1-git-send-email-owasserm@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 209.132.183.28 Cc: blauwirbel@gmail.com, stefanha@gmail.com, Orit Wasserman , quintela@redhat.com Subject: [Qemu-devel] [PATCH v5 8/9] QMP commands changes X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Orit Wasserman --- hmp-commands.hx | 34 ++++++++++++++++++++++++++-------- qmp-commands.hx | 44 +++++++++++++++++++++++++++++++++++++------- 2 files changed, 63 insertions(+), 15 deletions(-) diff --git a/hmp-commands.hx b/hmp-commands.hx index 14838b7..952d5cd 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -746,24 +746,29 @@ ETEXI { .name = "migrate", - .args_type = "detach:-d,blk:-b,inc:-i,uri:s", - .params = "[-d] [-b] [-i] uri", - .help = "migrate to URI (using -d to not wait for completion)" - "\n\t\t\t -b for migration without shared storage with" - " full copy of disk\n\t\t\t -i for migration without " - "shared storage with incremental copy of disk " - "(base image shared between src and destination)", + .args_type = "detach:-d,blk:-b,inc:-i,xbrle:-x,uri:s", + .params = "[-d] [-b] [-i] [-x] uri", + .help = "migrate to URI" + "\n\t -d to not wait for completion" + "\n\t -b for migration without shared storage with" + " full copy of disk" + "\n\t -i for migration without" + " shared storage with incremental copy of disk" + " (base image shared between source and destination)" + "\n\t -x to use XBRLE page delta compression", .user_print = monitor_user_noop, .mhandler.cmd_new = do_migrate, }, STEXI -@item migrate [-d] [-b] [-i] @var{uri} +@item migrate [-d] [-b] [-i] [-x] @var{uri} @findex migrate Migrate to @var{uri} (using -d to not wait for completion). -b for migration with full copy of disk -i for migration with incremental copy of disk (base image is shared) + -x to use XBRLE page delta compression + ETEXI { @@ -781,6 +786,19 @@ Cancel the current VM migration. ETEXI { + .name = "migrate_set_cachesize", + .args_type = "value:s", + .params = "value", + .help = "set cache size (in MB) for XBRLE migrations", + .mhandler.cmd = do_migrate_set_cachesize, + }, + +STEXI +@item migrate_set_cachesize @var{value} +Set cache size (in MB) for xbrle migrations. +ETEXI + + { .name = "migrate_set_speed", .args_type = "value:o", .params = "value", diff --git a/qmp-commands.hx b/qmp-commands.hx index 7e3f4b9..34bdfe9 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -430,13 +430,16 @@ EQMP { .name = "migrate", - .args_type = "detach:-d,blk:-b,inc:-i,uri:s", - .params = "[-d] [-b] [-i] uri", - .help = "migrate to URI (using -d to not wait for completion)" - "\n\t\t\t -b for migration without shared storage with" - " full copy of disk\n\t\t\t -i for migration without " - "shared storage with incremental copy of disk " - "(base image shared between src and destination)", + .args_type = "detach:-d,blk:-b,inc:-i,xbrle:-x,uri:s", + .params = "[-d] [-b] [-i] [-x] uri", + .help = "migrate to URI" + "\n\t -d to not wait for completion" + "\n\t -b for migration without shared storage with" + " full copy of disk" + "\n\t -i for migration without" + " shared storage with incremental copy of disk" + " (base image shared between source and destination)" + "\n\t -x to use XBRLE page delta compression", .user_print = monitor_user_noop, .mhandler.cmd_new = do_migrate, }, @@ -452,6 +455,7 @@ Arguments: - "blk": block migration, full disk copy (json-bool, optional) - "inc": incremental disk copy (json-bool, optional) - "uri": Destination URI (json-string) +- "xbrle": to use XBRLE page delta compression Example: @@ -490,6 +494,32 @@ Example: EQMP { + .name = "migrate_set_cachesize", + .args_type = "value:s", + .params = "value", + .help = "set cache size (in MB) for xbrle migrations", + .mhandler.cmd = do_migrate_set_cachesize, + }, + +SQMP +migrate_set_cachesize +--------------------- + +Set cache size to be used by XBRLE migration + +Arguments: + +- "value": cache size in bytes (json-number) + +Example: + +-> { "execute": "migrate_set_cachesize", "arguments": { "value": 500M } } +<- { "return": {} } + + +EQMP + + { .name = "migrate_set_speed", .args_type = "value:o", .mhandler.cmd_new = qmp_marshal_input_migrate_set_speed,