From nobody Tue Feb 10 15:29:32 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 150720232570188.72180458247647; Thu, 5 Oct 2017 04:18:45 -0700 (PDT) Received: from localhost ([::1]:39117 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e04Ac-0005A1-Px for importer@patchew.org; Thu, 05 Oct 2017 07:18:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36277) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e048i-0003vy-3X for qemu-devel@nongnu.org; Thu, 05 Oct 2017 07:16:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e048f-0000Ft-FB for qemu-devel@nongnu.org; Thu, 05 Oct 2017 07:16:28 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:56930) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e048f-0000FG-9U for qemu-devel@nongnu.org; Thu, 05 Oct 2017 07:16:25 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20171005111623euoutp02288559f70e27d818b0493ad98986c45d~qqGaYEAyH2915429154euoutp02K; Thu, 5 Oct 2017 11:16:23 +0000 (GMT) Received: from eusmges5.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20171005111623eucas1p214dd30b0972c8e9c1507a97781b49eb0~qqGZ9Qg8g0162001620eucas1p2d; Thu, 5 Oct 2017 11:16:23 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges5.samsung.com (EUCPMTA) with SMTP id 2E.23.12743.78416D95; Thu, 5 Oct 2017 12:16:23 +0100 (BST) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20171005111622eucas1p1dd4545fb4b45add67b222d91355aa208~qqGZUjj0_1747717477eucas1p1n; Thu, 5 Oct 2017 11:16:22 +0000 (GMT) Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 01.93.20118.68416D95; Thu, 5 Oct 2017 12:16:22 +0100 (BST) Received: from aperevalov-ubuntu.rnd.samsung.ru ([106.109.129.199]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OXC00M4YKN1XNA0@eusync4.samsung.com>; Thu, 05 Oct 2017 12:16:22 +0100 (BST) X-AuditID: cbfec7f5-f79d06d0000031c7-32-59d614875594 From: Alexey Perevalov To: qemu-devel@nongnu.org Date: Thu, 05 Oct 2017 14:16:05 +0300 Message-id: <1507202170-22619-2-git-send-email-a.perevalov@samsung.com> X-Mailer: git-send-email 2.7.4 In-reply-to: <1507202170-22619-1-git-send-email-a.perevalov@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrGIsWRmVeSWpSXmKPExsWy7djP87rtItciDU7/4baYe/c8i0Xvtnvs FtM+32a3uNL+k91iy/5v7BbHe3ewWNzZ0sfkwO7x5NpmJo/3+66yefRtWcUYwBzFZZOSmpNZ llqkb5fAldH06A9bwSfBipYV09kbGO/xdTFyckgImEhcOnuLCcIWk7hwbz1bFyMXh5DAUkaJ K1+6mSCcz4wSuxZcZ4PpePRuO1RiGaPEu9k7WCGcbiaJvx3LmbsYOTjYBAwk9t2zBWkQEZCU +N11mhmkhllgIaPEg4s97CA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M1ahRz8tmFbnz7Q2hO6r7V95ewttvfciwqUD4aq507b9CaYM/Pl9/SHb0r3pYmV 3bzUqCpRObE9b2PFhXKVZfuO8sgcsY+81inB5P+Hx/dC5aTig6suL54YaJHJO/ecutujnOg5 mxQez3ZgET7Wf0n2xt13NRL51+ssDjbc3yD7T+DQpGMFy5VYijMSDbWYi4oTAU3C16EbAgAA X-CMS-MailID: 20171005111622eucas1p1dd4545fb4b45add67b222d91355aa208 X-Msg-Generator: CA X-Sender-IP: 182.198.249.180 X-Local-Sender: =?UTF-8?B?QWxleGV5IFBlcmV2YWxvdhtTUlItVmlydHVhbGl6YXRpb24g?= =?UTF-8?B?TGFiG+yCvOyEseyghOyekBtTZW5pb3IgRW5naW5lZXI=?= X-Global-Sender: =?UTF-8?B?QWxleGV5IFBlcmV2YWxvdhtTUlItVmlydHVhbGl6YXRpb24g?= =?UTF-8?B?TGFiG1NhbXN1bmcgRWxlY3Ryb25pY3MbU2VuaW9yIEVuZ2luZWVy?= X-Sender-Code: =?UTF-8?B?QzEwG0NJU0hRG0MxMEdEMDFHRDAxMDE1NA==?= CMS-TYPE: 201P X-CMS-RootMailID: 20171005111622eucas1p1dd4545fb4b45add67b222d91355aa208 X-RootMTR: 20171005111622eucas1p1dd4545fb4b45add67b222d91355aa208 References: <1507202170-22619-1-git-send-email-a.perevalov@samsung.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 210.118.77.12 Subject: [Qemu-devel] [PATCH v11 1/6] migration: introduce postcopy-blocktime capability X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: heetae82.ahn@samsung.com, quintela@redhat.com, Alexey Perevalov , peterx@redhat.com, dgilbert@redhat.com, i.maximets@samsung.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Right now it could be used on destination side to enable vCPU blocktime calculation for postcopy live migration. vCPU blocktime - it's time since vCPU thread was put into interruptible sleep, till memory page was copied and thread awake. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Alexey Perevalov --- migration/migration.c | 9 +++++++++ migration/migration.h | 1 + qapi/migration.json | 5 ++++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/migration/migration.c b/migration/migration.c index 98429dc..713f070 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -1467,6 +1467,15 @@ bool migrate_zero_blocks(void) return s->enabled_capabilities[MIGRATION_CAPABILITY_ZERO_BLOCKS]; } =20 +bool migrate_postcopy_blocktime(void) +{ + MigrationState *s; + + s =3D migrate_get_current(); + + return s->enabled_capabilities[MIGRATION_CAPABILITY_POSTCOPY_BLOCKTIME= ]; +} + bool migrate_use_compression(void) { MigrationState *s; diff --git a/migration/migration.h b/migration/migration.h index b83ccea..c12ceba 100644 --- a/migration/migration.h +++ b/migration/migration.h @@ -193,6 +193,7 @@ int migrate_compress_level(void); int migrate_compress_threads(void); int migrate_decompress_threads(void); bool migrate_use_events(void); +bool migrate_postcopy_blocktime(void); =20 /* Sending on the return path - generic and then for each message type */ void migrate_send_rp_shut(MigrationIncomingState *mis, diff --git a/qapi/migration.json b/qapi/migration.json index f8b365e..0f2af26 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -343,12 +343,15 @@ # # @x-multifd: Use more than one fd for migration (since 2.11) # +# @postcopy-blocktime: Calculate downtime for postcopy live migration +# (since 2.11) +# # Since: 1.2 ## { 'enum': 'MigrationCapability', 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks', 'compress', 'events', 'postcopy-ram', 'x-colo', 'release-ram', - 'block', 'return-path', 'x-multifd' ] } + 'block', 'return-path', 'x-multifd', 'postcopy-blocktime' ] } =20 ## # @MigrationCapabilityStatus: --=20 2.7.4