From nobody Sun Sep 28 16:36:36 2025 Delivered-To: importer@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+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1756328540; cv=none; d=zohomail.com; s=zohoarc; b=CUhIWwerCGhvzbny14r5k8zW5DAIVZYzzfdbj+1EE6rUTsrVGnjCcPhUm3WFgPHEMnxPSkAE3VNgB99LXyZsSU7BG0qVU6eC+uXtZO1379tRkiWbNZyy5akfgx1wp0Xu6fwzQOS0MJUHFnOFfzDzRagNEnRR9NpFmF8NUBCXeHo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756328540; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=lRJ8eE7rheNIp6zO98qNHCY36RqYoQUzbq48qUhyxQg=; b=DkZdjk9AL2lepo9bKp38R8XUNHDCCHmCSzDoX+seAV8TYICjJ+4s4mMBDqU2oicF37ZI0TdT3YyN9qH0tN+R3HvV5TnBCIGfTLBif5ynmt95NvPM2iscaA8b9dO9g1YdmVMgp6wsT6Brqqvb1zmRK6did5oABz0emIu0JlAcTOc= 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+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1756328540098919.6017003126874; Wed, 27 Aug 2025 14:02:20 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1urNFw-0006pa-In; Wed, 27 Aug 2025 17:00:32 -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 1urNFj-0006lU-IW for qemu-devel@nongnu.org; Wed, 27 Aug 2025 17:00:26 -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 1urNFf-0006t9-E4 for qemu-devel@nongnu.org; Wed, 27 Aug 2025 17:00:18 -0400 Received: from mail-yb1-f198.google.com (mail-yb1-f198.google.com [209.85.219.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-78--hpwgCisOE6M8iAoK7lvUA-1; Wed, 27 Aug 2025 17:00:12 -0400 Received: by mail-yb1-f198.google.com with SMTP id 3f1490d57ef6-e96c3f851dcso270659276.2 for ; Wed, 27 Aug 2025 14:00:08 -0700 (PDT) Received: from x1.com (bras-base-aurron9134w-grc-11-174-89-135-121.dsl.bell.ca. [174.89.135.121]) by smtp.gmail.com with ESMTPSA id 3f1490d57ef6-e96e5530a32sm1389846276.17.2025.08.27.14.00.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Aug 2025 14:00:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1756328413; 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=lRJ8eE7rheNIp6zO98qNHCY36RqYoQUzbq48qUhyxQg=; b=D/oFLSpOuK0Au5IwunR9Od9jfPe4h7/uEBbvGmoplw3MsEgGf8/QCfqWL39P5hukECVqGm VfDQ50ShQJ4mrYXnXSUTGlCGOYdnA4I+021s/amFyeWNo7nrkCwmW8k0Q0ITXxV0j/LOqm 5oaNG9G3KIkHbreo2zVESyPGVA821/A= X-MC-Unique: -hpwgCisOE6M8iAoK7lvUA-1 X-Mimecast-MFC-AGG-ID: -hpwgCisOE6M8iAoK7lvUA_1756328408 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756328408; x=1756933208; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lRJ8eE7rheNIp6zO98qNHCY36RqYoQUzbq48qUhyxQg=; b=ASk7wfKrfkjG14FxnR6g/WOfhP8SemtWT0sFm25KwGECFanC5cGDYIZ3tU3MDZd0PD G4FAc2wcfMlQGn7gcr1fgUX19kCj1X/MKRVt7gRqEOLtX4uV4ioBlHaLyPy6wTOU3w/8 nH1dUmYwblFEMP5HwLeV60xRN6cBXqv8114X2mwPzU+7JCRIsZ3KpL6kUkEmsKHc4wzq qHP7SYlAH7YLAymXKBHo/eXb8jlLVFfhsSgjxFCmpJpYAQ9T2sg9VtUBcUEGwP+EOu0U +QA1sw9G2/vDheAwuoM6y3mLOGg2/QSmNpbrnhnQu4lD7W3xGClVO7wqptirLoZFOMtm XXEA== X-Gm-Message-State: AOJu0Yy0N8Lnx2jP+wF8s6qtCaK8bsVh5aHkq8IFSDUHG1nu7bKriDeE nddBbIM2yDtZDcimhIMXxxcOtSF8g1H3q/NMyEYZfrY38sO3zyxtaKkFiPRBTq/xQk+7ItgftZO 5cqjI+R58u0zf4cJA1Nw4guofnSRzl1PgdvpE47Ac7FfNDFV1LLIqmNGIKeeZV2dEz6byzkRr+x JoLauzu6Te0dOv1G7cVw+83HZbPrM+qopb27Li/Q== X-Gm-Gg: ASbGncvi92rOBNhZXezqpP2kNZh2Rtekq16atQtntg8KPZQqKdeKZ5jVLd/p2yXbDJ5 J9NJ3imh1T+v4p0+2/QZoF9Vx3Z9OoFohE0+sDbnRf09FAALjVjFkiWm/0g/reEZvehjRu/NVai XnA7wsHniQSE38rECx9Z+TlUSFRuh626lVfTY6Xtz5aWygGYmKWtuE4KPMdLaSWOozAsvihxz4O R7NczVl/xXD5I3XCpVhGSAhGgyGEbmD9pR01ZziRwSRIBe7S/VVt/RHcVUfLFBeofNXL9WmL/rG StMtIg2QuiUGTJjUkUHsIc3KQST7/sqYhj64cEjiRarsl/AjFNtWWmfABxTpAQOSfW2EhmVXCCp BSnSQv7IArXMhYJh3P3A= X-Received: by 2002:a05:6902:1249:b0:e95:3d8c:f10e with SMTP id 3f1490d57ef6-e953d8cf2a4mr14597214276.13.1756328407709; Wed, 27 Aug 2025 14:00:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH7gYZeSf/0Wf68bolNu0vksd3GOyhSqE61MyVfEdSnmecJOe2S3VaqtQjKAUOLLVKbkU3+/A== X-Received: by 2002:a05:6902:1249:b0:e95:3d8c:f10e with SMTP id 3f1490d57ef6-e953d8cf2a4mr14597146276.13.1756328407102; Wed, 27 Aug 2025 14:00:07 -0700 (PDT) From: Peter Xu To: qemu-devel@nongnu.org Cc: "Dr . David Alan Gilbert" , peterx@redhat.com, Kevin Wolf , Paolo Bonzini , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Fabiano Rosas , Hailiang Zhang , Yury Kotov , Vladimir Sementsov-Ogievskiy , Prasad Pandit , Zhang Chen , Li Zhijian , Juraj Marcin Subject: [PATCH RFC 8/9] migration/ram: Remove workaround on ram yield during load Date: Wed, 27 Aug 2025 16:59:47 -0400 Message-ID: <20250827205949.364606-9-peterx@redhat.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250827205949.364606-1-peterx@redhat.com> References: <20250827205949.364606-1-peterx@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=peterx@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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1756328542711124100 Content-Type: text/plain; charset="utf-8" This reverts e65cec5e5d97927d22b39167d3e8edeffc771788. RAM load path had a hack in the past explicitly yield the thread to the main coroutine when RAM load spinning in a tight loop. Not needed now because precopy RAM load now happens without the main thread. Signed-off-by: Peter Xu Reviewed-by: Fabiano Rosas --- migration/ram.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 7208bc114f..2d9a6d1095 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -4168,7 +4168,7 @@ static int parse_ramblocks(QEMUFile *f, ram_addr_t to= tal_ram_bytes) static int ram_load_precopy(QEMUFile *f) { MigrationIncomingState *mis =3D migration_incoming_get_current(); - int flags =3D 0, ret =3D 0, invalid_flags =3D 0, i =3D 0; + int flags =3D 0, ret =3D 0, invalid_flags =3D 0; =20 if (migrate_mapped_ram()) { invalid_flags |=3D (RAM_SAVE_FLAG_HOOK | RAM_SAVE_FLAG_MULTIFD_FLU= SH | @@ -4181,17 +4181,6 @@ static int ram_load_precopy(QEMUFile *f) void *host =3D NULL, *host_bak =3D NULL; uint8_t ch; =20 - /* - * Yield periodically to let main loop run, but an iteration of - * the main loop is expensive, so do it each some iterations - */ - if ((i & 32767) =3D=3D 0 && qemu_in_coroutine()) { - aio_co_schedule(qemu_get_current_aio_context(), - qemu_coroutine_self()); - qemu_coroutine_yield(); - } - i++; - addr =3D qemu_get_be64(f); ret =3D qemu_file_get_error(f); if (ret) { --=20 2.50.1