From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51062) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Up2Lp-0003os-64 for qemu-devel@nongnu.org; Tue, 18 Jun 2013 16:18:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Up2Ll-0007e8-52 for qemu-devel@nongnu.org; Tue, 18 Jun 2013 16:18:01 -0400 Received: from e39.co.us.ibm.com ([32.97.110.160]:39754) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Up2Lk-0007e2-Rq for qemu-devel@nongnu.org; Tue, 18 Jun 2013 16:17:57 -0400 Received: from /spool/local by e39.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 18 Jun 2013 14:17:34 -0600 Received: from d01relay05.pok.ibm.com (d01relay05.pok.ibm.com [9.56.227.237]) by d01dlp03.pok.ibm.com (Postfix) with ESMTP id D544EC90044 for ; Tue, 18 Jun 2013 16:17:31 -0400 (EDT) Received: from d03av06.boulder.ibm.com (d03av06.boulder.ibm.com [9.17.195.245]) by d01relay05.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r5IKHVfS317578 for ; Tue, 18 Jun 2013 16:17:31 -0400 Received: from d03av06.boulder.ibm.com (loopback [127.0.0.1]) by d03av06.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r5IKIc4P013892 for ; Tue, 18 Jun 2013 14:18:39 -0600 From: mrhines@linux.vnet.ibm.com Date: Tue, 18 Jun 2013 16:15:57 -0400 Message-Id: <1371586561-22803-11-git-send-email-mrhines@linux.vnet.ibm.com> In-Reply-To: <1371586561-22803-1-git-send-email-mrhines@linux.vnet.ibm.com> References: <1371586561-22803-1-git-send-email-mrhines@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH v10 10/14] rdma: introduce capability x-rdma-pin-all List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com, quintela@redhat.com, knoel@redhat.com, owasserm@redhat.com, abali@us.ibm.com, mrhines@us.ibm.com, gokul@us.ibm.com, pbonzini@redhat.com, chegu_vinod@hp.com From: "Michael R. Hines" This capability allows you to disable dynamic chunk registration for better throughput on high-performance links. For example, using an 8GB RAM virtual machine with all 8GB of memory in active use and the VM itself is completely idle using a 40 gbps infiniband link: 1. x-rdma-pin-all disabled total time: approximately 7.5 seconds @ 9.5 Gbps 2. x-rdma-pin-all enabled total time: approximately 4 seconds @ 26 Gbps These numbers would of course scale up to whatever size virtual machine you have to migrate using RDMA. Enabling this feature does *not* have any measurable affect on migration *downtime*. This is because, without this feature, all of the memory will have already been registered already in advance during the bulk round and does not need to be re-registered during the successive iteration rounds. Reviewed-by: Paolo Bonzini Reviewed-by: Chegu Vinod Reviewed-by: Eric Blake Tested-by: Chegu Vinod Tested-by: Michael R. Hines Signed-off-by: Michael R. Hines --- include/migration/migration.h | 2 ++ migration.c | 9 +++++++++ qapi-schema.json | 7 ++++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/include/migration/migration.h b/include/migration/migration.h index d60c64c..2e6001d 100644 --- a/include/migration/migration.h +++ b/include/migration/migration.h @@ -125,6 +125,8 @@ void migrate_add_blocker(Error *reason); */ void migrate_del_blocker(Error *reason); +bool migrate_rdma_pin_all(void); + int xbzrle_encode_buffer(uint8_t *old_buf, uint8_t *new_buf, int slen, uint8_t *dst, int dlen); int xbzrle_decode_buffer(uint8_t *src, int slen, uint8_t *dst, int dlen); diff --git a/migration.c b/migration.c index 441a3b2..a704d48 100644 --- a/migration.c +++ b/migration.c @@ -476,6 +476,15 @@ void qmp_migrate_set_downtime(double value, Error **errp) max_downtime = (uint64_t)value; } +bool migrate_rdma_pin_all(void) +{ + MigrationState *s; + + s = migrate_get_current(); + + return s->enabled_capabilities[MIGRATION_CAPABILITY_X_RDMA_PIN_ALL]; +} + int migrate_use_xbzrle(void) { MigrationState *s; diff --git a/qapi-schema.json b/qapi-schema.json index b239adb..4e9cd6d 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -608,10 +608,15 @@ # This feature allows us to minimize migration traffic for certain work # loads, by sending compressed difference of the pages # +# @x-rdma-pin-all: Controls whether or not the entire VM memory footprint is +# mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage. +# Disabled by default. Experimental: may (or may not) be renamed after +# further testing is complete. (since 1.6) +# # Since: 1.2 ## { 'enum': 'MigrationCapability', - 'data': ['xbzrle'] } + 'data': ['xbzrle', 'x-rdma-pin-all'] } ## # @MigrationCapabilityStatus -- 1.7.10.4