From nobody Sun May 19 16:27:41 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1687463516; cv=none; d=zohomail.com; s=zohoarc; b=kKbqmvwevKKjXimohjP4GFjuPRcdwnp6FuO3wBbRteC+BJeOpj65H4nIyS6wP7A80Zk+AZiJHKcL5CxuoJ4/I/49PGox3EwF/bbEqNiXaP/g+UBI0XMZHg2dYIl9u3UzeHb79c8qn+H74M7ySyX+wfdmee05RedamMZF3j42hFA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1687463516; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=6trTkE+Vcw/Da/asnTunTLTjljpC9Zt9lEdrJchDXtA=; b=hiOV96OYg7blrVxuoqEIIRVt4HRcb7mvP+qdxUvGE44bKtRg7Ps+g6I1319q7lqdfXSbibtYXCkk3R2pOSuX8saiF7O51vATFEBTfOQ0WAUb6uXOv8P8P/+yYAMgCZk5d5QPeQ9PBCpg2DrSHsSFqHrn1OH3oiZWS2LQt7L8ckI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1687463516059587.7465153761258; Thu, 22 Jun 2023 12:51:56 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qCQKF-00045e-9R; Thu, 22 Jun 2023 15:50:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qCQKD-00043z-6y for qemu-devel@nongnu.org; Thu, 22 Jun 2023 15:50:37 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qCQKB-0002o7-Ig for qemu-devel@nongnu.org; Thu, 22 Jun 2023 15:50:36 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-312-y8E-3RayPWq2xTjZs1FDaw-1; Thu, 22 Jun 2023 15:50:28 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BE92C104458D; Thu, 22 Jun 2023 19:50:26 +0000 (UTC) Received: from secure.mitica (unknown [10.39.192.73]) by smtp.corp.redhat.com (Postfix) with ESMTP id 32E43C00049; Thu, 22 Jun 2023 19:50:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687463435; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6trTkE+Vcw/Da/asnTunTLTjljpC9Zt9lEdrJchDXtA=; b=HmpUrztGJ7gRXPRvsP5yWJ9Pt3cpUQV5Yu3z75gk1xCU2Qsajy3A1VBdWp7xH+NsaOb2ju PS3S8y1xVxrAqf1nvYfBthp8U4dF/s022El9vwPnQf5Ax/myKUJa9G4RtkQyOl3VlzhDEB tIvBq37w3mfEI+45niAtEpxxbKGdrDw= X-MC-Unique: y8E-3RayPWq2xTjZs1FDaw-1 From: Juan Quintela To: qemu-devel@nongnu.org Cc: Markus Armbruster , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Juan Quintela , Thomas Huth , libvir-list@redhat.com, Peter Xu , qemu-block@nongnu.org, Eric Blake , Fam Zheng , Paolo Bonzini , Stefan Hajnoczi , Leonardo Bras Subject: [PATCH v2 1/5] migration: Use proper indentation for migration.json Date: Thu, 22 Jun 2023 21:50:15 +0200 Message-Id: <20230622195019.4396-2-quintela@redhat.com> In-Reply-To: <20230622195019.4396-1-quintela@redhat.com> References: <20230622195019.4396-1-quintela@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=quintela@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1687463517703100001 Content-Type: text/plain; charset="utf-8" We broke it with dirtyrate limit patches. Signed-off-by: Juan Quintela Acked-by: Peter Xu --- qapi/migration.json | 67 ++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 34 deletions(-) diff --git a/qapi/migration.json b/qapi/migration.json index 6ff39157ba..ad8cc57071 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -258,17 +258,17 @@ # blocked. Present and non-empty when migration is blocked. # (since 6.0) # -# @dirty-limit-throttle-time-per-round: Maximum throttle time (in microsec= onds) of virtual -# CPUs each dirty ring full round, w= hich shows how -# MigrationCapability dirty-limit af= fects the guest -# during live migration. (since 8.1) +# @dirty-limit-throttle-time-per-round: Maximum throttle time (in +# microseconds) of virtual CPUs each dirty ring full round, which +# shows how MigrationCapability dirty-limit affects the guest +# during live migration. (since 8.1) # -# @dirty-limit-ring-full-time: Estimated average dirty ring full time (in = microseconds) -# each dirty ring full round, note that the v= alue equals -# dirty ring memory size divided by average d= irty page rate -# of virtual CPU, which can be used to observ= e the average -# memory load of virtual CPU indirectly. Note= that zero -# means guest doesn't dirty memory (since 8.1) +# @dirty-limit-ring-full-time: Estimated average dirty ring full time +# (in microseconds) each dirty ring full round, note that the +# value equals dirty ring memory size divided by average dirty +# page rate of virtual CPU, which can be used to observe the +# average memory load of virtual CPU indirectly. Note that zero +# means guest doesn't dirty memory (since 8.1) # # Since: 0.14 ## @@ -510,14 +510,13 @@ # (since 7.1) # # @dirty-limit: If enabled, migration will use the dirty-limit algo to -# throttle down guest instead of auto-converge algo. -# Throttle algo only works when vCPU's dirtyrate greater -# than 'vcpu-dirty-limit', read processes in guest os -# aren't penalized any more, so this algo can improve -# performance of vCPU during live migration. This is an -# optional performance feature and should not affect the -# correctness of the existing auto-converge algo. -# (since 8.1) +# throttle down guest instead of auto-converge algo. Throttle +# algo only works when vCPU's dirtyrate greater than +# 'vcpu-dirty-limit', read processes in guest os aren't penalized +# any more, so this algo can improve performance of vCPU during +# live migration. This is an optional performance feature and +# should not affect the correctness of the existing auto-converge +# algo. (since 8.1) # # Features: # @@ -811,17 +810,17 @@ # Nodes are mapped to their block device name if there is one, and # to their node name otherwise. (Since 5.2) # -# @x-vcpu-dirty-limit-period: Periodic time (in milliseconds) of dirty lim= it during -# live migration. Should be in the range 1 to = 1000ms, -# defaults to 1000ms. (Since 8.1) +# @x-vcpu-dirty-limit-period: Periodic time (in milliseconds) of dirty +# limit during live migration. Should be in the range 1 to 1000ms, +# defaults to 1000ms. (Since 8.1) # # @vcpu-dirty-limit: Dirtyrate limit (MB/s) during live migration. -# Defaults to 1. (Since 8.1) +# Defaults to 1. (Since 8.1) # # Features: # # @unstable: Members @x-checkpoint-delay and @x-vcpu-dirty-limit-period -# are experimental. +# are experimental. # # Since: 2.4 ## @@ -977,17 +976,17 @@ # Nodes are mapped to their block device name if there is one, and # to their node name otherwise. (Since 5.2) # -# @x-vcpu-dirty-limit-period: Periodic time (in milliseconds) of dirty lim= it during -# live migration. Should be in the range 1 to = 1000ms, -# defaults to 1000ms. (Since 8.1) +# @x-vcpu-dirty-limit-period: Periodic time (in milliseconds) of dirty +# limit during live migration. Should be in the range 1 to 1000ms, +# defaults to 1000ms. (Since 8.1) # # @vcpu-dirty-limit: Dirtyrate limit (MB/s) during live migration. -# Defaults to 1. (Since 8.1) +# Defaults to 1. (Since 8.1) # # Features: # # @unstable: Members @x-checkpoint-delay and @x-vcpu-dirty-limit-period -# are experimental. +# are experimental. # # TODO: either fuse back into MigrationParameters, or make # MigrationParameters members mandatory @@ -1180,17 +1179,17 @@ # Nodes are mapped to their block device name if there is one, and # to their node name otherwise. (Since 5.2) # -# @x-vcpu-dirty-limit-period: Periodic time (in milliseconds) of dirty lim= it during -# live migration. Should be in the range 1 to = 1000ms, -# defaults to 1000ms. (Since 8.1) +# @x-vcpu-dirty-limit-period: Periodic time (in milliseconds) of dirty +# limit during live migration. Should be in the range 1 to 1000ms, +# defaults to 1000ms. (Since 8.1) # # @vcpu-dirty-limit: Dirtyrate limit (MB/s) during live migration. -# Defaults to 1. (Since 8.1) +# Defaults to 1. (Since 8.1) # # Features: # -# @unstable: Members @x-checkpoint-delay and @x-vcpu-dirty-limit-period -# are experimental. +# @unstable: Members @x-checkpoint-delay and +# @x-vcpu-dirty-limit-period are experimental. # # Since: 2.4 ## --=20 2.40.1 From nobody Sun May 19 16:27:41 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1687463501; cv=none; d=zohomail.com; s=zohoarc; b=UCY7VQqZktGbgwTtowJ62mMAHNloav3uMtZ0BmheBtXLNMmLhfwAWSBcMBhLk84EWIh18/FidoyPFQ+9OQhbg3zivq1Hkd2wuyq+HGUv7HYXR+2/o/0G5XR5TtO1Ye0rRUzc3QsJQwksedXMZnmdA3tBXQsn/U6C78Wu57tGKsQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1687463501; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=OJEoWvSK4rcyGnW5iFuITs0CavsS5ZXLN1pX+qXE0ZU=; b=LFs0DPMdT501NA291tObuwnjk0Y/je74P8UYkqZGjBb4vT0ycmd6h4XvTQzTXMKHa2VCUUeJ0oXJg8LaUSZAO8XYDPWBa9FCjQ3T201C+k1fSBJwmXcGtqJP8vy2O6AGsEaGCmWAOTD27KRMtPr+unK+Jb+riLAg1PG3RYnlRmU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1687463501425639.2334823816334; Thu, 22 Jun 2023 12:51:41 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qCQKE-000455-Pk; Thu, 22 Jun 2023 15:50:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qCQKC-00043r-FK for qemu-devel@nongnu.org; Thu, 22 Jun 2023 15:50:36 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qCQKB-0002nK-0S for qemu-devel@nongnu.org; Thu, 22 Jun 2023 15:50:36 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-436-U8oc86UiNlOR1g2WYBqoig-1; Thu, 22 Jun 2023 15:50:32 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2F2FC88D0FD; Thu, 22 Jun 2023 19:50:29 +0000 (UTC) Received: from secure.mitica (unknown [10.39.192.73]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0F036C00049; Thu, 22 Jun 2023 19:50:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687463434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OJEoWvSK4rcyGnW5iFuITs0CavsS5ZXLN1pX+qXE0ZU=; b=Xd/FxPfhGT+SYXaKqsA5XMoRqvKPviK9XOqs//PkB/dcCuCQbriqXwJolhUXTBehsmvA7R 5+6953T16lEhlXszGLEi9Q7E/zVr0sNL5s3Li2/StuxzLmGUN9D+teYRCNlQlZipttqDGB RTzQZRWbltNoeKGn3E0YanHTuMNVnn4= X-MC-Unique: U8oc86UiNlOR1g2WYBqoig-1 From: Juan Quintela To: qemu-devel@nongnu.org Cc: Markus Armbruster , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Juan Quintela , Thomas Huth , libvir-list@redhat.com, Peter Xu , qemu-block@nongnu.org, Eric Blake , Fam Zheng , Paolo Bonzini , Stefan Hajnoczi , Leonardo Bras Subject: [PATCH v2 2/5] migration: migrate 'inc' command option is deprecated. Date: Thu, 22 Jun 2023 21:50:16 +0200 Message-Id: <20230622195019.4396-3-quintela@redhat.com> In-Reply-To: <20230622195019.4396-1-quintela@redhat.com> References: <20230622195019.4396-1-quintela@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=quintela@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1687463502073100001 Content-Type: text/plain; charset="utf-8" Set the 'block_incremental' migration parameter to 'true' instead. Signed-off-by: Juan Quintela Reviewed-by: Thomas Huth --- docs/about/deprecated.rst | 7 +++++++ qapi/migration.json | 12 ++++++++++-- migration/migration.c | 6 ++++++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index e1aa0eafc8..cc0001041f 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -433,3 +433,10 @@ Migration ``skipped`` field in Migration stats has been deprecated. It hasn't been used for more than 10 years. =20 +``inc`` migrate command option (since 8.1) +'''''''''''''''''''''''''''''''''''''''''' + +The new way to modify migration is using migration parameters. +``inc`` functionality can be achieved by setting the +``block-incremental`` migration parameter to ``true``. + diff --git a/qapi/migration.json b/qapi/migration.json index ad8cc57071..8b30f748ef 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -1479,13 +1479,20 @@ # # @blk: do block migration (full disk copy) # -# @inc: incremental disk copy migration +# @inc: incremental disk copy migration. This option is deprecated. +# Set the 'block-incremetantal' migration parameter to 'true' +# instead. # # @detach: this argument exists only for compatibility reasons and is # ignored by QEMU # # @resume: resume one paused migration, default "off". (since 3.0) # +# Features: +# +# @deprecated: option @inc should be enabled by setting the +# 'block-incremental' migration parameter to 'true'. +# # Returns: nothing on success # # Since: 0.14 @@ -1507,7 +1514,8 @@ # <- { "return": {} } ## { 'command': 'migrate', - 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', + 'data': {'uri': 'str', '*blk': 'bool', + '*inc': { 'type': 'bool', 'features': ['deprecated'] }, '*detach': 'bool', '*resume': 'bool' } } =20 ## diff --git a/migration/migration.c b/migration/migration.c index 7a4ba2e846..abc40e6ef6 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -1557,6 +1557,12 @@ static bool migrate_prepare(MigrationState *s, bool = blk, bool blk_inc, { Error *local_err =3D NULL; =20 + if (blk_inc) { + warn_report("-inc migrate option is deprecated, set the " + "'block-incremental' migration parameter to 'true'" + " instead."); + } + if (resume) { if (s->state !=3D MIGRATION_STATUS_POSTCOPY_PAUSED) { error_setg(errp, "Cannot resume if there is no " --=20 2.40.1 From nobody Sun May 19 16:27:41 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1687463521; cv=none; d=zohomail.com; s=zohoarc; b=PRxX9j6sMfOu8fhO1yjUmkr26b6J0kq26YyZjENmJZtPJyIFM+0pTVm/oLaavAsKHpkr95WPlO0/B2rvyFhloHtHrT9Sc3olJQmf/EwX7KDCKueDIsSP0yl2h2ifxLnYfWDIiwzk8EZIg02C4yfuknFLw9IaTZPvWIjW+mceXlk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1687463521; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=fI3S2OCmB0MvN93l8l7vdXzPcvm7ZD+8BlQA4Yf3rfQ=; b=VGfWjKa1xyjKOtWs8nu26EbygEA1UsT8uTxttxHFyJ3P4VPi4HYvDxKRUwzrGJTfv0Sa0Fg+r9pw4R8N8sxOMioxZyxUDZSYdiFVRp6rS7SBKAq4Tz2eBBwHgCD40vx9Ze9dNG74MazHnS25cOE2QZgRxRkf2kdQYv7VBbnDerw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1687463521524122.22728910668445; Thu, 22 Jun 2023 12:52:01 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qCQKp-0004JP-U7; Thu, 22 Jun 2023 15:51:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qCQKT-0004CN-22 for qemu-devel@nongnu.org; Thu, 22 Jun 2023 15:50:53 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qCQKR-0002sG-Gr for qemu-devel@nongnu.org; Thu, 22 Jun 2023 15:50:52 -0400 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-303-LMPxIg_IMACpFuo_Uo-i9Q-1; Thu, 22 Jun 2023 15:50:42 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 954E21C07551; Thu, 22 Jun 2023 19:50:32 +0000 (UTC) Received: from secure.mitica (unknown [10.39.192.73]) by smtp.corp.redhat.com (Postfix) with ESMTP id 74466C00049; Thu, 22 Jun 2023 19:50:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687463450; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fI3S2OCmB0MvN93l8l7vdXzPcvm7ZD+8BlQA4Yf3rfQ=; b=HMEbIBJNZeLUTrNhhZ4oSTqrgxC+2iBMxx6RNOYE2TDHRKOZcvRqFsib0S24mssHAgYV33 SLZeEc0b5H8/2e8SblSf6RnnKRKRooVcQg4w+IF/lpMv4lyqPmxIIMXVNZHnEaMq25Z8n9 heZEtJ57NmDzciqKl432LvGLfz6pojs= X-MC-Unique: LMPxIg_IMACpFuo_Uo-i9Q-1 From: Juan Quintela To: qemu-devel@nongnu.org Cc: Markus Armbruster , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Juan Quintela , Thomas Huth , libvir-list@redhat.com, Peter Xu , qemu-block@nongnu.org, Eric Blake , Fam Zheng , Paolo Bonzini , Stefan Hajnoczi , Leonardo Bras Subject: [PATCH v2 3/5] migration: migrate 'blk' command option is deprecated. Date: Thu, 22 Jun 2023 21:50:17 +0200 Message-Id: <20230622195019.4396-4-quintela@redhat.com> In-Reply-To: <20230622195019.4396-1-quintela@redhat.com> References: <20230622195019.4396-1-quintela@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=quintela@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1687463522535100003 Content-Type: text/plain; charset="utf-8" Set the 'block' migration capability to 'true' instead. Signed-off-by: Juan Quintela Reviewed-by: Thomas Huth --- docs/about/deprecated.rst | 7 +++++++ qapi/migration.json | 10 +++++++--- migration/migration.c | 5 +++++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index cc0001041f..f727db958e 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -440,3 +440,10 @@ The new way to modify migration is using migration par= ameters. ``inc`` functionality can be achieved by setting the ``block-incremental`` migration parameter to ``true``. =20 +``blk`` migrate command option (since 8.1) +'''''''''''''''''''''''''''''''''''''''''' + +The new way to modify migration is using migration parameters. +``blk`` functionality can be achieved by setting the +``block`` migration capability to ``true``. + diff --git a/qapi/migration.json b/qapi/migration.json index 8b30f748ef..291af9407e 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -1477,7 +1477,9 @@ # # @uri: the Uniform Resource Identifier of the destination VM # -# @blk: do block migration (full disk copy) +# @blk: do block migration (full disk copy). This option is +# deprecated. Set the 'block' migration capability to 'true' +# instead. # # @inc: incremental disk copy migration. This option is deprecated. # Set the 'block-incremetantal' migration parameter to 'true' @@ -1491,7 +1493,8 @@ # Features: # # @deprecated: option @inc should be enabled by setting the -# 'block-incremental' migration parameter to 'true'. +# 'block-incremental' migration parameter to 'true', option @blk +# should be enabled by setting the 'block' capability to 'true'. # # Returns: nothing on success # @@ -1514,7 +1517,8 @@ # <- { "return": {} } ## { 'command': 'migrate', - 'data': {'uri': 'str', '*blk': 'bool', + 'data': {'uri': 'str', + '*blk': { 'type': 'bool', 'features': ['deprecated'] }, '*inc': { 'type': 'bool', 'features': ['deprecated'] }, '*detach': 'bool', '*resume': 'bool' } } =20 diff --git a/migration/migration.c b/migration/migration.c index abc40e6ef6..4c7e8ff5ee 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -1563,6 +1563,11 @@ static bool migrate_prepare(MigrationState *s, bool = blk, bool blk_inc, " instead."); } =20 + if (blk) { + warn_report("-blk migrate option is deprecated, set the " + "'block' capability to 'true' instead."); + } + if (resume) { if (s->state !=3D MIGRATION_STATUS_POSTCOPY_PAUSED) { error_setg(errp, "Cannot resume if there is no " --=20 2.40.1 From nobody Sun May 19 16:27:41 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1687463504; cv=none; d=zohomail.com; s=zohoarc; b=A8saR15CbJUTC0XACUIbM9J76rH4n1IwXU+60ZGNz8w85kOFlhBoP4+j+oa2R1Y6MBXrrQwqbXaDdgLAIGi8eOun11+rNNh0l08eAzSHgLbHR0c6JE5ZJ3ea3Ur+axAu+kqO/BaOWuAOldWkQLqlnkI9McdwdcTKrDChvM8uo5Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1687463504; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=wd9gQX3xT46jkB3DvMY7w/wI+JD70INi2OM0Nj+ylog=; b=g3MVX6Gc0Cvmcw1dsSWzPN5fRNvL2c35DQ3Y91wwZPxfUwxSHtUOaIBj3iDqudWINH1Ltwt7h9i2s5j/qjdhkNkv+DU7maM6kU9cyh+oVpJpDEEIIK+o358Q4My5hEawVZSqcsC5fQdCJndSdsbPaDP4xYla4SYaED2DSAiIetE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1687463504205650.08359712481; Thu, 22 Jun 2023 12:51:44 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qCQKj-0004Et-Iw; Thu, 22 Jun 2023 15:51:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qCQKR-0004Bp-IL for qemu-devel@nongnu.org; Thu, 22 Jun 2023 15:50:51 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qCQKN-0002re-UC for qemu-devel@nongnu.org; Thu, 22 Jun 2023 15:50:50 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-448-D8VouvcLNQawVVaDS4rlcw-1; Thu, 22 Jun 2023 15:50:45 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A2D6990ED20; Thu, 22 Jun 2023 19:50:35 +0000 (UTC) Received: from secure.mitica (unknown [10.39.192.73]) by smtp.corp.redhat.com (Postfix) with ESMTP id DFB04C00049; Thu, 22 Jun 2023 19:50:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687463447; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wd9gQX3xT46jkB3DvMY7w/wI+JD70INi2OM0Nj+ylog=; b=TTlYm2Eg4nVjCRtilF2pwIChv6TR5zbiz4Wvy1B+Gm7+trynY+mM8zXETfwwSppHRf/1f2 ILzlvhSISksGF8SbgbdIi0OvI1ObTMqQa0FM+7einoYsKDq5XupG2XhZ9WWo/Cgmfqb1LI L5VQNRCuz9iFZfvB/uYUFxvSfOITUIA= X-MC-Unique: D8VouvcLNQawVVaDS4rlcw-1 From: Juan Quintela To: qemu-devel@nongnu.org Cc: Markus Armbruster , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Juan Quintela , Thomas Huth , libvir-list@redhat.com, Peter Xu , qemu-block@nongnu.org, Eric Blake , Fam Zheng , Paolo Bonzini , Stefan Hajnoczi , Leonardo Bras , Kevin Wolf , Hanna Czenczek Subject: [PATCH v2 4/5] migration: Deprecate block migration Date: Thu, 22 Jun 2023 21:50:18 +0200 Message-Id: <20230622195019.4396-5-quintela@redhat.com> In-Reply-To: <20230622195019.4396-1-quintela@redhat.com> References: <20230622195019.4396-1-quintela@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=quintela@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1687463505674100009 Content-Type: text/plain; charset="utf-8" It is obsolete. It is better to use driver-mirror with NBD instead. CC: Kevin Wolf CC: Eric Blake CC: Stefan Hajnoczi CC: Hanna Czenczek Signed-off-by: Juan Quintela --- docs/about/deprecated.rst | 10 ++++++++++ qapi/migration.json | 30 +++++++++++++++++++++++++----- migration/block.c | 3 +++ migration/options.c | 9 ++++++++- 4 files changed, 46 insertions(+), 6 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index f727db958e..2d7c48185e 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -447,3 +447,13 @@ The new way to modify migration is using migration par= ameters. ``blk`` functionality can be achieved by setting the ``block`` migration capability to ``true``. =20 +block migration (since 8.1) +''''''''''''''''''''''''''' + +Block migration is too inflexible. It needs to migrate all block +devices or none. + +Please see "QMP invocation for live storage migration with +``driver-mirror`` + NBD" in docs/interop/live-block-operations.rst for +a detailed explanation. + diff --git a/qapi/migration.json b/qapi/migration.json index 291af9407e..08dee855cb 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -270,11 +270,16 @@ # average memory load of virtual CPU indirectly. Note that zero # means guest doesn't dirty memory (since 8.1) # +# Features: +# +# @deprecated: @disk migration is deprecated. Use driver-mirror +# with NBD instead. +# # Since: 0.14 ## { 'struct': 'MigrationInfo', 'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats', - '*disk': 'MigrationStats', + '*disk': { 'type': 'MigrationStats', 'features': ['deprecated']= }, '*vfio': 'VfioStats', '*xbzrle-cache': 'XBZRLECacheStats', '*total-time': 'int', @@ -520,6 +525,9 @@ # # Features: # +# @deprecated: @block migration is deprecated. Use driver-mirror +# with NBD instead. +# # @unstable: Members @x-colo and @x-ignore-shared are experimental. # # Since: 1.2 @@ -529,7 +537,8 @@ 'compress', 'events', 'postcopy-ram', { 'name': 'x-colo', 'features': [ 'unstable' ] }, 'release-ram', - 'block', 'return-path', 'pause-before-switchover', 'multifd', + { 'name': 'block', 'features': [ 'deprecated' ] }, + 'return-path', 'pause-before-switchover', 'multifd', 'dirty-bitmaps', 'postcopy-blocktime', 'late-block-activate', { 'name': 'x-ignore-shared', 'features': [ 'unstable' ] }, 'validate-uuid', 'background-snapshot', @@ -819,6 +828,9 @@ # # Features: # +# @deprecated: Member @block-incremental is obsolete. Use +# driver-mirror with NBD instead. +# # @unstable: Members @x-checkpoint-delay and @x-vcpu-dirty-limit-period # are experimental. # @@ -834,7 +846,7 @@ 'tls-creds', 'tls-hostname', 'tls-authz', 'max-bandwidth', 'downtime-limit', { 'name': 'x-checkpoint-delay', 'features': [ 'unstable' ] }, - 'block-incremental', + { 'name': 'block-incremental', 'features': [ 'deprecated' ] }, 'multifd-channels', 'xbzrle-cache-size', 'max-postcopy-bandwidth', 'max-cpu-throttle', 'multifd-compression', @@ -985,6 +997,9 @@ # # Features: # +# @deprecated: Member @block-incremental is obsolete. Use +# driver-mirror with NBD instead. +# # @unstable: Members @x-checkpoint-delay and @x-vcpu-dirty-limit-period # are experimental. # @@ -1013,7 +1028,8 @@ '*downtime-limit': 'uint64', '*x-checkpoint-delay': { 'type': 'uint32', 'features': [ 'unstable' ] }, - '*block-incremental': 'bool', + '*block-incremental': { 'type': 'bool', + 'features': [ 'deprecated' ] }, '*multifd-channels': 'uint8', '*xbzrle-cache-size': 'size', '*max-postcopy-bandwidth': 'size', @@ -1188,6 +1204,9 @@ # # Features: # +# @deprecated: Member @block-incremental is obsolete. Use +# driver-mirror with NBD instead. +# # @unstable: Members @x-checkpoint-delay and # @x-vcpu-dirty-limit-period are experimental. # @@ -1213,7 +1232,8 @@ '*downtime-limit': 'uint64', '*x-checkpoint-delay': { 'type': 'uint32', 'features': [ 'unstable' ] }, - '*block-incremental': 'bool', + '*block-incremental': { 'type': 'bool', + 'features': [ 'deprecated' ] }, '*multifd-channels': 'uint8', '*xbzrle-cache-size': 'size', '*max-postcopy-bandwidth': 'size', diff --git a/migration/block.c b/migration/block.c index b29e80bdc4..a095024108 100644 --- a/migration/block.c +++ b/migration/block.c @@ -722,6 +722,9 @@ static int block_save_setup(QEMUFile *f, void *opaque) trace_migration_block_save("setup", block_mig_state.submitted, block_mig_state.transferred); =20 + warn_report("block migration is deprecated. Use driver-mirror with" + "NBD instead."); + qemu_mutex_lock_iothread(); ret =3D init_blk_migration(f); if (ret < 0) { diff --git a/migration/options.c b/migration/options.c index c072c2fab7..24c883696f 100644 --- a/migration/options.c +++ b/migration/options.c @@ -12,6 +12,7 @@ */ =20 #include "qemu/osdep.h" +#include "qemu/error-report.h" #include "exec/target_page.h" #include "qapi/clone-visitor.h" #include "qapi/error.h" @@ -456,10 +457,14 @@ bool migrate_caps_check(bool *old_caps, bool *new_cap= s, Error **errp) if (new_caps[MIGRATION_CAPABILITY_BLOCK]) { error_setg(errp, "QEMU compiled without old-style (blk/-b, inc/-i)= " "block migration"); - error_append_hint(errp, "Use drive_mirror+NBD instead.\n"); + error_append_hint(errp, "Use driver-mirror with NBD instead.\n"); return false; } #endif + if (new_caps[MIGRATION_CAPABILITY_BLOCK]) { + warn_report("Block migration is deprecated. " + "Use driver-mirror with NBD instead."); + } =20 #ifndef CONFIG_REPLICATION if (new_caps[MIGRATION_CAPABILITY_X_COLO]) { @@ -1336,6 +1341,8 @@ static void migrate_params_apply(MigrateSetParameters= *params, Error **errp) } =20 if (params->has_block_incremental) { + warn_report("Block migration is deprecated. " + "Use driver-mirror with NBD instead."); s->parameters.block_incremental =3D params->block_incremental; } if (params->has_multifd_channels) { --=20 2.40.1 From nobody Sun May 19 16:27:41 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1687463521; cv=none; d=zohomail.com; s=zohoarc; b=AZbxXyxwUdL7nDuVf/2fHQGdUrnMZzD3PF8hvUPvq9Ybr4w3zuX9Bg3ZFv+nsLaDOFFmLVBmMolGIOuFAEWbui6nJHrGZux5OJnx6MEbGJtlG+AKV163uI4Kzw4I2s7lCqjAt0Mh+05bomqL2dmqjr0oz5mtj5Nv0yqaV23aiNk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1687463521; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=lwpwWf1d57sYk+PxdjYgvePkLUlujtf3K4nsHwB7k0s=; b=MM23DPcs0wL7pUdTsOATktO9LKpqcHGYS6wzxmFw7KEYnT9D3+DY1ZTsCSZ1tv2ZORfilHuuGHzZODpecojdccjDJZ/+UPxvFzlKEqfBwKD1CUNpQN6pHvhfBQbHOSGkJUGmuGBp1DfnCd+e/bJ4H1a2RtPQeKLc5c5oHNwXrX0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 168746352186072.25315127575686; Thu, 22 Jun 2023 12:52:01 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qCQKo-0004HR-9Y; Thu, 22 Jun 2023 15:51:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qCQKS-0004Bs-1O for qemu-devel@nongnu.org; Thu, 22 Jun 2023 15:50:53 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qCQKP-0002s1-Ha for qemu-devel@nongnu.org; Thu, 22 Jun 2023 15:50:51 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-586-5SNf8qriPTGfdTj7o84NXw-1; Thu, 22 Jun 2023 15:50:44 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E067390ED43; Thu, 22 Jun 2023 19:50:37 +0000 (UTC) Received: from secure.mitica (unknown [10.39.192.73]) by smtp.corp.redhat.com (Postfix) with ESMTP id BEB61C00049; Thu, 22 Jun 2023 19:50:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687463449; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lwpwWf1d57sYk+PxdjYgvePkLUlujtf3K4nsHwB7k0s=; b=aHdljQS2S9G8/kj7KMn7RqwRNLdQQJBQrNI8R2e1xhfv2hAP2zr3sGsQncaGS5bpiQEnTj Xsaardpk1CZFqPHe1Gisb37hog5XJC3Ed30DDUeGdXaGs1lpUiGHEq8ucrrzsGerV1cjjf P3iTPk0byU1Mk60fzQiw/eGyO97cvMA= X-MC-Unique: 5SNf8qriPTGfdTj7o84NXw-1 From: Juan Quintela To: qemu-devel@nongnu.org Cc: Markus Armbruster , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Juan Quintela , Thomas Huth , libvir-list@redhat.com, Peter Xu , qemu-block@nongnu.org, Eric Blake , Fam Zheng , Paolo Bonzini , Stefan Hajnoczi , Leonardo Bras Subject: [PATCH v2 5/5] migration: Deprecate old compression method Date: Thu, 22 Jun 2023 21:50:19 +0200 Message-Id: <20230622195019.4396-6-quintela@redhat.com> In-Reply-To: <20230622195019.4396-1-quintela@redhat.com> References: <20230622195019.4396-1-quintela@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=quintela@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1687463522577100005 Content-Type: text/plain; charset="utf-8" Signed-off-by: Juan Quintela Acked-by: Peter Xu --- docs/about/deprecated.rst | 8 +++ qapi/migration.json | 102 ++++++++++++++++++++++++-------------- migration/options.c | 13 +++++ 3 files changed, 86 insertions(+), 37 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 2d7c48185e..792de61c8b 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -457,3 +457,11 @@ Please see "QMP invocation for live storage migration = with ``driver-mirror`` + NBD" in docs/interop/live-block-operations.rst for a detailed explanation. =20 +old compression method (since 8.1) +'''''''''''''''''''''''''''''''''' + +Compression method fails too much. Too many races. We are going to +remove it if nobody fixes it. For starters, migration-test +compression tests are disabled becase they fail randomly. If you need +compression, use multifd compression methods. + diff --git a/qapi/migration.json b/qapi/migration.json index 08dee855cb..11f759b90b 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -244,7 +244,9 @@ # # @compression: migration compression statistics, only returned if # compression feature is on and status is 'active' or 'completed' -# (Since 3.1) +# This feature is unreliable and not tested. It is recommended to +# use multifd migration instead, which offers an alternative +# reliable and tested compression implementation. (Since 3.1) # # @socket-address: Only used for tcp, to know what the real port is # (Since 4.0) @@ -272,8 +274,11 @@ # # Features: # -# @deprecated: @disk migration is deprecated. Use driver-mirror -# with NBD instead. +# @deprecated: @disk migration is deprecated. Use driver-mirror with +# NBD instead. @compression is unreliable and untested. It is +# recommended to use multifd migration, which offers an +# alternative compression implementation that is reliable and +# tested. # # Since: 0.14 ## @@ -291,7 +296,7 @@ '*blocked-reasons': ['str'], '*postcopy-blocktime': 'uint32', '*postcopy-vcpu-blocktime': ['uint32'], - '*compression': 'CompressionStats', + '*compression': { 'type': 'CompressionStats', 'features': ['dep= recated'] }, '*socket-address': ['SocketAddress'], '*dirty-limit-throttle-time-per-round': 'uint64', '*dirty-limit-ring-full-time': 'uint64'} } @@ -446,7 +451,8 @@ # compress and xbzrle are both on, compress only takes effect in # the ram bulk stage, after that, it will be disabled and only # xbzrle takes effect, this can help to minimize migration -# traffic. The feature is disabled by default. (since 2.4 ) +# traffic. The feature is disabled by default. Obsolete. Use +# multifd compression methods if needed. (since 2.4 ) # # @events: generate events for each migration state change (since 2.4 # ) @@ -525,8 +531,9 @@ # # Features: # -# @deprecated: @block migration is deprecated. Use driver-mirror -# with NBD instead. +# @deprecated: @block migration is deprecated. Use driver-mirror with +# NBD instead. @compress is obsolete, use multifd compression +# methods instead. # # @unstable: Members @x-colo and @x-ignore-shared are experimental. # @@ -534,7 +541,8 @@ ## { 'enum': 'MigrationCapability', 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks', - 'compress', 'events', 'postcopy-ram', + { 'name': 'compress', 'features': [ 'deprecated' ] }, + 'events', 'postcopy-ram', { 'name': 'x-colo', 'features': [ 'unstable' ] }, 'release-ram', { 'name': 'block', 'features': [ 'deprecated' ] }, @@ -694,22 +702,24 @@ # migration, the compression level is an integer between 0 and 9, # where 0 means no compression, 1 means the best compression # speed, and 9 means best compression ratio which will consume -# more CPU. +# more CPU. Obsolete, see multifd compression if needed. # # @compress-threads: Set compression thread count to be used in live # migration, the compression thread count is an integer between 1 -# and 255. +# and 255. Obsolete, see multifd compression if needed. # # @compress-wait-thread: Controls behavior when all compression # threads are currently busy. If true (default), wait for a free # compression thread to become available; otherwise, send the page -# uncompressed. (Since 3.1) +# uncompressed. Obsolete, see multifd compression if +# needed. (Since 3.1) # # @decompress-threads: Set decompression thread count to be used in # live migration, the decompression thread count is an integer # between 1 and 255. Usually, decompression is at least 4 times as # fast as compression, so set the decompress-threads to the number -# about 1/4 of compress-threads is adequate. +# about 1/4 of compress-threads is adequate. Obsolete, see multifd +# compression if needed. # # @throttle-trigger-threshold: The ratio of bytes_dirty_period and # bytes_xfer_period to trigger throttling. It is expressed as @@ -829,7 +839,9 @@ # Features: # # @deprecated: Member @block-incremental is obsolete. Use -# driver-mirror with NBD instead. +# driver-mirror with NBD instead. Compression is obsolete, so +# members @compress-level, @compress-threads, @decompress-threads +# and @compress-wait-thread should not be used. # # @unstable: Members @x-checkpoint-delay and @x-vcpu-dirty-limit-period # are experimental. @@ -839,8 +851,11 @@ { 'enum': 'MigrationParameter', 'data': ['announce-initial', 'announce-max', 'announce-rounds', 'announce-step', - 'compress-level', 'compress-threads', 'decompress-threads', - 'compress-wait-thread', 'throttle-trigger-threshold', + { 'name': 'compress-level', 'features': [ 'deprecated' ] }, + { 'name': 'compress-threads', 'features': [ 'deprecated' ] }, + { 'name': 'decompress-threads', 'features': [ 'deprecated' ] }, + { 'name': 'compress-wait-thread', 'features': [ 'deprecated' ] = }, + 'throttle-trigger-threshold', 'cpu-throttle-initial', 'cpu-throttle-increment', 'cpu-throttle-tailslow', 'tls-creds', 'tls-hostname', 'tls-authz', 'max-bandwidth', @@ -870,16 +885,17 @@ # @announce-step: Increase in delay (in milliseconds) between # subsequent packets in the announcement (Since 4.0) # -# @compress-level: compression level +# @compress-level: compression level. Obsolete and deprecated. # -# @compress-threads: compression thread count +# @compress-threads: compression thread count. Obsolete and deprecated. # # @compress-wait-thread: Controls behavior when all compression # threads are currently busy. If true (default), wait for a free # compression thread to become available; otherwise, send the page -# uncompressed. (Since 3.1) +# uncompressed. Obsolete and deprecated. (Since 3.1) # -# @decompress-threads: decompression thread count +# @decompress-threads: decompression thread count. Obsolete and +# deprecated. # # @throttle-trigger-threshold: The ratio of bytes_dirty_period and # bytes_xfer_period to trigger throttling. It is expressed as @@ -998,7 +1014,9 @@ # Features: # # @deprecated: Member @block-incremental is obsolete. Use -# driver-mirror with NBD instead. +# driver-mirror with NBD instead. Compression is obsolete, so +# members @compress-level, @compress-threads, @decompress-threads +# and @compress-wait-thread should not be used. # # @unstable: Members @x-checkpoint-delay and @x-vcpu-dirty-limit-period # are experimental. @@ -1013,10 +1031,14 @@ '*announce-max': 'size', '*announce-rounds': 'size', '*announce-step': 'size', - '*compress-level': 'uint8', - '*compress-threads': 'uint8', - '*compress-wait-thread': 'bool', - '*decompress-threads': 'uint8', + '*compress-level': { 'type': 'uint8', + 'features': [ 'deprecated' ] }, + '*compress-threads': { 'type': 'uint8', + 'features': [ 'deprecated' ] }, + '*compress-wait-thread': { 'type': 'bool', + 'features': [ 'deprecated' ] }, + '*decompress-threads': { 'type': 'uint8', + 'features': [ 'deprecated' ] }, '*throttle-trigger-threshold': 'uint8', '*cpu-throttle-initial': 'uint8', '*cpu-throttle-increment': 'uint8', @@ -1052,7 +1074,7 @@ # Example: # # -> { "execute": "migrate-set-parameters" , -# "arguments": { "compress-level": 1 } } +# "arguments": { "multifd-channels": 5 } } # <- { "return": {} } ## { 'command': 'migrate-set-parameters', 'boxed': true, @@ -1075,16 +1097,18 @@ # @announce-step: Increase in delay (in milliseconds) between # subsequent packets in the announcement (Since 4.0) # -# @compress-level: compression level +# @compress-level: compression level. Obsolete and deprecated. # -# @compress-threads: compression thread count +# @compress-threads: compression thread count. Obsolete and +# deprecated. # # @compress-wait-thread: Controls behavior when all compression # threads are currently busy. If true (default), wait for a free # compression thread to become available; otherwise, send the page -# uncompressed. (Since 3.1) +# uncompressed. Obsolete and deprecated. (Since 3.1) # -# @decompress-threads: decompression thread count +# @decompress-threads: decompression thread count. Obsolete and +# deprecated. # # @throttle-trigger-threshold: The ratio of bytes_dirty_period and # bytes_xfer_period to trigger throttling. It is expressed as @@ -1205,7 +1229,9 @@ # Features: # # @deprecated: Member @block-incremental is obsolete. Use -# driver-mirror with NBD instead. +# driver-mirror with NBD instead. Compression is obsolete, so +# members @compress-level, @compress-threads, @decompress-threads +# and @compress-wait-thread should not be used. # # @unstable: Members @x-checkpoint-delay and # @x-vcpu-dirty-limit-period are experimental. @@ -1217,10 +1243,14 @@ '*announce-max': 'size', '*announce-rounds': 'size', '*announce-step': 'size', - '*compress-level': 'uint8', - '*compress-threads': 'uint8', - '*compress-wait-thread': 'bool', - '*decompress-threads': 'uint8', + '*compress-level': { 'type': 'uint8', + 'features': [ 'deprecated' ] }, + '*compress-threads': { 'type': 'uint8', + 'features': [ 'deprecated' ] }, + '*compress-wait-thread': { 'type': 'bool', + 'features': [ 'deprecated' ] }, + '*decompress-threads': { 'type': 'uint8', + 'features': [ 'deprecated' ] }, '*throttle-trigger-threshold': 'uint8', '*cpu-throttle-initial': 'uint8', '*cpu-throttle-increment': 'uint8', @@ -1259,10 +1289,8 @@ # # -> { "execute": "query-migrate-parameters" } # <- { "return": { -# "decompress-threads": 2, +# "multifd-channels": 2, # "cpu-throttle-increment": 10, -# "compress-threads": 8, -# "compress-level": 1, # "cpu-throttle-initial": 20, # "max-bandwidth": 33554432, # "downtime-limit": 300 diff --git a/migration/options.c b/migration/options.c index 24c883696f..7a25339156 100644 --- a/migration/options.c +++ b/migration/options.c @@ -466,6 +466,11 @@ bool migrate_caps_check(bool *old_caps, bool *new_caps= , Error **errp) "Use driver-mirror with NBD instead."); } =20 + if (new_caps[MIGRATION_CAPABILITY_COMPRESS]) { + warn_report("Old compression method is deprecated. " + "Use multifd compression methods instead."); + } + #ifndef CONFIG_REPLICATION if (new_caps[MIGRATION_CAPABILITY_X_COLO]) { error_setg(errp, "QEMU compiled without replication module" @@ -1275,18 +1280,26 @@ static void migrate_params_apply(MigrateSetParamete= rs *params, Error **errp) /* TODO use QAPI_CLONE() instead of duplicating it inline */ =20 if (params->has_compress_level) { + warn_report("Old compression is deprecated. " + "Use multifd compression methods instead."); s->parameters.compress_level =3D params->compress_level; } =20 if (params->has_compress_threads) { + warn_report("Old compression is deprecated. " + "Use multifd compression methods instead."); s->parameters.compress_threads =3D params->compress_threads; } =20 if (params->has_compress_wait_thread) { + warn_report("Old compression is deprecated. " + "Use multifd compression methods instead."); s->parameters.compress_wait_thread =3D params->compress_wait_threa= d; } =20 if (params->has_decompress_threads) { + warn_report("Old compression is deprecated. " + "Use multifd compression methods instead."); s->parameters.decompress_threads =3D params->decompress_threads; } =20 --=20 2.40.1