From nobody Sun Apr 28 06:29:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1587012334; cv=none; d=zohomail.com; s=zohoarc; b=Lf1+dGRnd2evpJWrkaCt839ak3hTlajJBgU/zY9PBXQyDYECIF+DT/7BzeBiGzatxDpGNPr3Qou+5YJ+PSAjVA7bUf7gZ9f68k6flMzDIAddCFRwEyAjkCB+GAnj2J+/SjMXPd+o9Noo3h6IDk/Mwa1wer3DEUBhyBg6e6P6F0o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1587012334; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=FkOFCK9OtVpBOKEyITsJdz5JHSo3lth/mNYnuNGU2Mg=; b=e5aSsNoCKL1dD1XlVY1WmqbfZb/sgMvKH0Y0s5xw93RC3gQEUe6fSIp2n6ogOC61D7VMFcgNdNcbcGH/BQYmOVCUd7ikxbWfqYqOIc5CTb+PFo0PusgpZh3zmmglWMMLO5Z9TuKzssZj97/sCcADCJcBHn7ARdZzUymElPiifuY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1587012334113597.610909552771; Wed, 15 Apr 2020 21:45:34 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-275-gSNvXyOZPeWRv9pLQZyxpA-1; Thu, 16 Apr 2020 00:45:30 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7338D13F9; Thu, 16 Apr 2020 04:45:24 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7914C119F57; Thu, 16 Apr 2020 04:45:23 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 90AD71809565; Thu, 16 Apr 2020 04:45:18 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 03G4jHOA031203 for ; Thu, 16 Apr 2020 00:45:17 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7BDB610552D9; Thu, 16 Apr 2020 04:45:17 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7761B10552D6 for ; Thu, 16 Apr 2020 04:45:15 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1D40D8FF663 for ; Thu, 16 Apr 2020 04:45:15 +0000 (UTC) Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-41-xiONwyH3M9OhOBBmVm5Blg-1; Thu, 16 Apr 2020 00:45:10 -0400 Received: by mail-pf1-f196.google.com with SMTP id r20so1108678pfh.9; Wed, 15 Apr 2020 21:45:09 -0700 (PDT) Received: from sle15sp2rc2hostf.suse.asia ([45.122.156.254]) by smtp.gmail.com with ESMTPSA id z60sm1171659pjj.14.2020.04.15.21.45.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Apr 2020 21:45:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587012332; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=FkOFCK9OtVpBOKEyITsJdz5JHSo3lth/mNYnuNGU2Mg=; b=XPoMCdg98bs3BjdzFNpIVvBmgBn+j/fpnvvZZ9gvGIDoJV4ugDak3861BdbDpMeDvJ9ODY 2U4d0OWnwf/PC5EXphgigYq+H8LmGomI1LvsNPOVyp/VP9FyKfYX+cGEX2Dq+JJkRGKpse Hm1C78mAsKps1YVdbnCBYhPmSc2liys= X-MC-Unique: gSNvXyOZPeWRv9pLQZyxpA-1 X-MC-Unique: xiONwyH3M9OhOBBmVm5Blg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=h3gXlBmDQw/NORM0hYWz/fSu99SMMSFgpr8hS6mp/2A=; b=tyyGZH2DzFTOZpE6EaJR8q9TEMB+d02MDDZhlcFL8Ov2ybD2RFXhdHkkgMTagbezyX p+i21XrGdatD5Kr3PXvNHRo4QT0V6k99CX56XP/BneXoGVuAIqzquI03aRl3kTHHVKy8 OBu4AP71F6cBfpDBdup7pOu7NlmCTprC53n/w/hdwmM/NzHZSmno/xYSZcrtv5ERS40h xL3JynmmzhlAGE7OE6OTiOHZg7itA8PIj7CN17sRgQnNCm1YnFVQbJvuo3/+ipl/Jg1w NEUHhK1bZ9Zg5MITDmAiUuzRibyIoX95d4gmS4jrmneKkhjej+Oon5B3NpH9smRdLcv3 XSAw== X-Gm-Message-State: AGi0PuZoIadWGzI0x4qPrU64uzs/X4AZRvUcED9x+Aa2XQyzFEfBpjn8 T11Ey5QFXS1SpYre60+0FFouqqCxG28= X-Google-Smtp-Source: APiQypJecCgtC955/CF1LjRGYJLNGVlazOhAG1zzt0Pcov0x+eQauQaMYplDJhSDehUfwqSFNw6oRw== X-Received: by 2002:a63:4a02:: with SMTP id x2mr3417572pga.224.1587012308318; Wed, 15 Apr 2020 21:45:08 -0700 (PDT) From: Lin Ma To: libvir-list@redhat.com Subject: [libvirt] [PATCH] qemu: fix hang in p2p + xbzrle compression + parallel migration Date: Thu, 16 Apr 2020 12:44:51 +0800 Message-Id: <20200416044451.21134-1-lma@suse.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 03G4jHOA031203 X-loop: libvir-list@redhat.com Cc: jdenemar@redhat.com, Lin Ma X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" When we do parallel migration, The multifd-channels migration parameter needs to be set on the destination side as well before incoming migration URI, unless we accept the default number of connections(2). Usually, This can be correctly handled by libvirtd. But in this case if we use p2p + xbzrle compression without parameter '--comp-xbzrle-cache', qemuMigrationParamsDump returns too early, The corresponding migration=20 parameter will not be set on the destination side, It results QEMU hangs. Reproducer: virsh migrate --live --p2p --comp-methods xbzrle \ --parallel --parallel-connections 3 GUEST qemu+ssh://dsthost/system or virsh migrate --live --p2p --compressed \ --parallel --parallel-connections 3 GUEST qemu+ssh://dsthost/system Signed-off-by: Lin Ma Reviewed-by: Jiri Denemark --- src/qemu/qemu_migration_params.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/qemu/qemu_migration_params.c b/src/qemu/qemu_migration_par= ams.c index dd5e2ce1b6..810199370f 100644 --- a/src/qemu/qemu_migration_params.c +++ b/src/qemu/qemu_migration_params.c @@ -630,7 +630,6 @@ qemuMigrationParamsDump(qemuMigrationParamsPtr migParam= s, if (migParams->compMethods =3D=3D 1ULL << QEMU_MIGRATION_COMPRESS_XBZR= LE && !migParams->params[QEMU_MIGRATION_PARAM_XBZRLE_CACHE_SIZE].set) { *flags |=3D VIR_MIGRATE_COMPRESSED; - return 0; } =20 for (i =3D 0; i < QEMU_MIGRATION_COMPRESS_LAST; ++i) { --=20 2.23.0