From nobody Mon Feb 9 18:43:58 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1690204030; cv=none; d=zohomail.com; s=zohoarc; b=kfcgSw46OoINejP5PT6Ed4G1Ws9m2Anhce/MxM8tF+11oUEeL8GN5SJKpbreuuYO+YkrYp5XFSmQw6duvfOtB9k1MXAct1Eea47V1tMlPmWQ1zbbdc7nitvWD+GyB9H6DAGapAVxSoP0jDX0mQHppkuEg+KsWlB7W0KCSSU1eBw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1690204030; h=Content-Type: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=j2QZJCtHhaH7HqI/ypiRvoBO4jcPfMfyKnCvIG4aho8=; b=m6DwfVVywlgobhBHx7dNnMghOFr3o/91vAuXJt/0ssUFfVVFiWhTZ3fyxFWFdbweRieC1fTm943xP0R+51Us18zYryHhpsfwHtIgjQEs09Txva7SMaC9BF4KEedxJVGGs/P3his1vajjHNA3PFwihiwS1VB50JybgcLjNrFVR30= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1690204030881482.86699324861627; Mon, 24 Jul 2023 06:07:10 -0700 (PDT) Received: from mimecast-mx02.redhat.com (66.187.233.73 [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-450-UHmzjmapOXuH5-7A4ALyjA-1; Mon, 24 Jul 2023 09:07:05 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D0D9B1C06EC5; Mon, 24 Jul 2023 13:07:00 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id BD33AF7832; Mon, 24 Jul 2023 13:07:00 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 97E7B194658D; Mon, 24 Jul 2023 13:07:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id EA560194658D for ; Mon, 24 Jul 2023 13:06:58 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id BA668F782E; Mon, 24 Jul 2023 13:06:58 +0000 (UTC) Received: from secure.mitica (unknown [10.39.194.115]) by smtp.corp.redhat.com (Postfix) with ESMTP id D7A49F782D; Mon, 24 Jul 2023 13:06:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690204029; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=j2QZJCtHhaH7HqI/ypiRvoBO4jcPfMfyKnCvIG4aho8=; b=DfOBNLkyoQUpIJ9FwemNjCD4lo+AjQjbDrY1+jloRj4vfOWFRpIHcTu/rWsZTTOWaJxBU0 2zstJS2JyKypHsDCxZbe1wmWXEFXjmFe2YgPAqvaE5gP0xaJxS4RzmOXOTmTNCe78owh/D x3I4y78la++grCmJLrfj62DIYyiqRaI= X-MC-Unique: UHmzjmapOXuH5-7A4ALyjA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Juan Quintela To: qemu-devel@nongnu.org Subject: [PATCH 07/26] migration: Refactor auto-converge capability logic Date: Mon, 24 Jul 2023 15:06:20 +0200 Message-Id: <20230724130639.93135-8-quintela@redhat.com> In-Reply-To: <20230724130639.93135-1-quintela@redhat.com> References: <20230724130639.93135-1-quintela@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , =?UTF-8?q?Hyman=20Huang=28=E9=BB=84=E5=8B=87=29?= , Thomas Huth , Juan Quintela , libvir-list@redhat.com, Markus Armbruster , Peter Xu , Leonardo Bras , Paolo Bonzini , Eric Blake Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1690204229403100001 From: Hyman Huang(=E9=BB=84=E5=8B=87) Check if block migration is running before throttling guest down in auto-converge way. Note that this modification is kind of like code clean, because block migration does not depend on auto-converge capability, so the order of checks can be adjusted. Signed-off-by: Hyman Huang(=E9=BB=84=E5=8B=87) Acked-by: Peter Xu Reviewed-by: Juan Quintela Message-Id: <168618975839.6361.17407633874747688653-5@git.sr.ht> Signed-off-by: Juan Quintela --- migration/ram.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/migration/ram.c b/migration/ram.c index 0ada6477e8..f31de47a47 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -995,7 +995,11 @@ static void migration_trigger_throttle(RAMState *rs) /* During block migration the auto-converge logic incorrectly detects * that ram migration makes no progress. Avoid this by disabling the * throttling logic during the bulk phase of block migration. */ - if (migrate_auto_converge() && !blk_mig_bulk_active()) { + if (blk_mig_bulk_active()) { + return; + } + + if (migrate_auto_converge()) { /* The following detection logic can be refined later. For now: Check to see if the ratio between dirtied bytes and the approx. amount of bytes that just got transferred since the last time --=20 2.40.1