From nobody Sun Nov 24 13:39:35 2024 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=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1723580792; cv=none; d=zohomail.com; s=zohoarc; b=eFDVvbs3DSbkqMOLv5qSWpucRYsM/oLrGFSZxwdf/kObru4icvHKppkf+vkdC4UDeleb9MIIkJt+l4Ue4EbRderyNN7CEPI1OOwD4QlTxaVVXhmPsD/VJlacCvPJOUCgdzDj2Uh2jViaByBNcsJ11G1vHJyND5Hhlgl+UHRnKG8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1723580792; h=Content-Type: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=LWXPvrAXN+b9vbW8f3D9TjDx5XdO3wBrf9b11Ogrln0=; b=gUGQ7aoMFz5AdWoCf6ldzougSkinB6XaSj/1wzAlpLWJr+QRqrUzyZFDwWo7IbBOzWEbmEkr748QBe4eK7rLhDp4a2v2L6EWRn/lv4dfrM6/jGbZgUpGr7UVGMWYTMav+Q40XYOYMX3kxXjOSN72V1QryUu3lIS/Rbzl+hjLD68= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1723580792212740.1040368724266; Tue, 13 Aug 2024 13:26:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sdy40-0006Z7-Or; Tue, 13 Aug 2024 16:24:16 -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 1sdy3s-00060g-Mg for qemu-devel@nongnu.org; Tue, 13 Aug 2024 16:24:09 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sdy3S-0006Gl-GW for qemu-devel@nongnu.org; Tue, 13 Aug 2024 16:24:06 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-428ec6c190eso45335995e9.1 for ; Tue, 13 Aug 2024 13:23:42 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36e4cfeef61sm11263938f8f.57.2024.08.13.13.23.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Aug 2024 13:23:38 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id A48BE5FD6E; Tue, 13 Aug 2024 21:23:30 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723580621; x=1724185421; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LWXPvrAXN+b9vbW8f3D9TjDx5XdO3wBrf9b11Ogrln0=; b=ejEKkYMBIvRcmoBbwB/OoxI1xhEXX28w6sTylrPxb23f0mPhocMewCvnKb+c0bpeqF bSEeoPmmV/zeg/6cacsnFi1uyfxmUrhuM9olxFcRSpmH6FfFT79EukzNt4X1qg3vRUir juNmwntJOVkXMSy4kC/MH0q8HOa90YqeS2bhkhFMr/dOc1lQcaTdK7nOqgy9mgxM9YIE ++oa82OjY344zqtGov3nGOt2eouGucblHCiPkXz5Z//+IcBEKed0EdVAHsh58TXrLurj LJvd9ITQt3hzyO0kDOQNYy4J9qprGBdeiRXIj3TLGe01N1u4w/i+DdzLkj1xXaStPyud W0yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723580621; x=1724185421; 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=LWXPvrAXN+b9vbW8f3D9TjDx5XdO3wBrf9b11Ogrln0=; b=m2IoNroGqYEAgcgKm+w+QjBxAY/2XJMRl5tEx4aHbj3SCm58Tie4j8Q4GUKbYBZgzq 15khZBfGkyw3Vic3ltTXwbU9tKB8KJOkoqAfU90y5ENSNh3Fu+AlGaWs7c3OXY4N3y1w toHG6o1dbSopMbrkvb3xHmTk8GQhgghJd+r0LubduKIWkKdBR4+bLl3yjX3wNc5pImi+ NYZv3tM/+VMlQzw0dgbJbcvox4EKIPnKun0D37tdma1mKhTe/yH8/UCayt7f6thxzDZp 7U9aUHb0+1yrW88IVEo888SaDdq3JHZ6B0Nl0n1BMfccQssMmjGOCg3sh85WCKx/rl2i RTqg== X-Gm-Message-State: AOJu0YwULQ+3aKjSBVFlv1oI9smOkVDoUEZJbCRV2PFBdZx1MDd2vuzA n7kl+drI/jfWNM2xNzziwEwxS+WMt89U/l7+FpUQzPcSZr/6/F/RRcUv4VlB22s= X-Google-Smtp-Source: AGHT+IHIn4A5f69zdSgZtSwfK8+fGkY7fWUCnbaP/Qf2os8KqW9X4tR1aS/JBmZCAslm/18faf3Cyg== X-Received: by 2002:a5d:4001:0:b0:371:72a8:15e with SMTP id ffacd0b85a97d-37177777850mr446555f8f.16.1723580620625; Tue, 13 Aug 2024 13:23:40 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Alistair Francis , Michael Roth , Palmer Dabbelt , Mahmoud Mandour , Pavel Dovgalyuk , Yoshinori Sato , Weiwei Li , Eduardo Habkost , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Markus Armbruster , David Hildenbrand , Beraldo Leal , Liu Zhiwei , Eric Auger , Song Gao , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-arm@nongnu.org, Peter Xu , Jiri Pirko , Eric Blake , Fabiano Rosas , qemu-s390x@nongnu.org, Peter Maydell , "Michael S. Tsirkin" , Daniel Henrique Barboza , John Snow , Alexandre Iooss , Konstantin Kostiuk , Pierrick Bouvier , Cleber Rosa , Ilya Leoshkevich , qemu-riscv@nongnu.org, Thomas Huth , Paolo Bonzini , Richard Henderson , Jason Wang , Bin Meng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Nicholas Piggin Subject: [PATCH v2 13/21] Revert "replay: stop us hanging in rr_wait_io_event" Date: Tue, 13 Aug 2024 21:23:21 +0100 Message-Id: <20240813202329.1237572-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240813202329.1237572-1-alex.bennee@linaro.org> References: <20240813202329.1237572-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::32f; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32f.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1723580793356116600 From: Nicholas Piggin This reverts commit 1f881ea4a444ef36a8b6907b0b82be4b3af253a2. That commit causes reverse_debugging.py test failures, and does not seem to solve the root cause of the problem x86-64 still hangs in record/replay tests. The problem with short-cutting the iowait that was taken during record phase is that related events will not get consumed at the same points (e.g., reading the clock). A hang with zero icount always seems to be a symptom of an earlier problem that has caused the recording to become out of synch with the execution and consumption of events by replay. Acked-by: Alex Benn=C3=A9e Signed-off-by: Nicholas Piggin Message-Id: <20240813050638.446172-6-npiggin@gmail.com> Signed-off-by: Alex Benn=C3=A9e --- include/sysemu/replay.h | 5 ----- accel/tcg/tcg-accel-ops-rr.c | 2 +- replay/replay.c | 21 --------------------- 3 files changed, 1 insertion(+), 27 deletions(-) diff --git a/include/sysemu/replay.h b/include/sysemu/replay.h index f229b2109c..8102fa54f0 100644 --- a/include/sysemu/replay.h +++ b/include/sysemu/replay.h @@ -73,11 +73,6 @@ int replay_get_instructions(void); /*! Updates instructions counter in replay mode. */ void replay_account_executed_instructions(void); =20 -/** - * replay_can_wait: check if we should pause for wait-io - */ -bool replay_can_wait(void); - /* Processing clocks and other time sources */ =20 /*! Save the specified clock */ diff --git a/accel/tcg/tcg-accel-ops-rr.c b/accel/tcg/tcg-accel-ops-rr.c index 48c38714bd..c59c77da4b 100644 --- a/accel/tcg/tcg-accel-ops-rr.c +++ b/accel/tcg/tcg-accel-ops-rr.c @@ -109,7 +109,7 @@ static void rr_wait_io_event(void) { CPUState *cpu; =20 - while (all_cpu_threads_idle() && replay_can_wait()) { + while (all_cpu_threads_idle()) { rr_stop_kick_timer(); qemu_cond_wait_bql(first_cpu->halt_cond); } diff --git a/replay/replay.c b/replay/replay.c index b8564a4813..895fa6b67a 100644 --- a/replay/replay.c +++ b/replay/replay.c @@ -451,27 +451,6 @@ void replay_start(void) replay_enable_events(); } =20 -/* - * For none/record the answer is yes. - */ -bool replay_can_wait(void) -{ - if (replay_mode =3D=3D REPLAY_MODE_PLAY) { - /* - * For playback we shouldn't ever be at a point we wait. If - * the instruction count has reached zero and we have an - * unconsumed event we should go around again and consume it. - */ - if (replay_state.instruction_count =3D=3D 0 && replay_state.has_un= read_data) { - return false; - } else { - replay_sync_error("Playback shouldn't have to iowait"); - } - } - return true; -} - - void replay_finish(void) { if (replay_mode =3D=3D REPLAY_MODE_NONE) { --=20 2.39.2