From patchwork Sat Feb 26 15:40:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 84664 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 7DD16B70D2 for ; Sun, 27 Feb 2011 03:17:03 +1100 (EST) Received: from localhost ([127.0.0.1]:52695 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PtMpI-0002Rc-FF for incoming@patchwork.ozlabs.org; Sat, 26 Feb 2011 11:17:00 -0500 Received: from [140.186.70.92] (port=40795 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PtMGN-0002U2-2B for qemu-devel@nongnu.org; Sat, 26 Feb 2011 10:40:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PtMGM-0007br-1I for qemu-devel@nongnu.org; Sat, 26 Feb 2011 10:40:54 -0500 Received: from mail-ww0-f53.google.com ([74.125.82.53]:41779) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PtMGL-0007RV-TF for qemu-devel@nongnu.org; Sat, 26 Feb 2011 10:40:53 -0500 Received: by mail-ww0-f53.google.com with SMTP id 29so366964wwb.10 for ; Sat, 26 Feb 2011 07:40:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:from:to:cc:subject:date:message-id :x-mailer:in-reply-to:references; bh=9/oKwnRxR0o8Icg8v0z5lHruY0gAIbyWzZckWqulvCg=; b=DNLy1QZCniHdrCiGrBvW3AXNATeXc3ITMdCi/O5G1Ec0tWiChY410BRv/VhCg/S2kA iaTNqIGT71oraWQ8hRWbTr/1AkxZlXNHIBCpE7LYjBfrL1snxdQrnRxN5fSdelMv/ENX 3OqACWlBrPGg8qGAqxx9dk0exqJUuHbkmCwKo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; b=ebFxFUpNGXclu1EMbMj+ayCe95Z6IS7F+Lo2H4WWy6iTX6WToziblYOIQzSJAxi1sN qr2YDQzuNneHrjwEPDuwN2aWJrLp47IZS2tDuH+X2eF7N1iDtqcMN397PCbxaYQ5UaFI kT9dl3SedrlABmrNvYOvRjoh5iB/HwVuSR9jA= Received: by 10.227.135.4 with SMTP id l4mr3249941wbt.95.1298734853498; Sat, 26 Feb 2011 07:40:53 -0800 (PST) Received: from localhost.localdomain (93-34-149-100.ip50.fastwebnet.it [93.34.149.100]) by mx.google.com with ESMTPS id f27sm1592788wbf.1.2011.02.26.07.40.51 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 26 Feb 2011 07:40:52 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Sat, 26 Feb 2011 16:40:13 +0100 Message-Id: <1298734819-1960-17-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.4 In-Reply-To: <1298734819-1960-1-git-send-email-pbonzini@redhat.com> References: <1298734819-1960-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 74.125.82.53 Cc: jan.kiszka@siemens.com, aurelien@aurel32.net Subject: [Qemu-devel] [PATCH v2 upstream 16/22] do not use timedwait on qemu_pause_cond X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org all_vcpus_paused can start returning true after penv->stopped changes from 0 to 1. When this is done, qemu_pause_cond is always signaled. Signed-off-by: Paolo Bonzini --- cpus.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/cpus.c b/cpus.c index e367b3b..8f169ad 100644 --- a/cpus.c +++ b/cpus.c @@ -938,7 +938,7 @@ void pause_all_vcpus(void) } while (!all_vcpus_paused()) { - qemu_cond_timedwait(&qemu_pause_cond, &qemu_global_mutex, 100); + qemu_cond_wait(&qemu_pause_cond, &qemu_global_mutex); penv = first_cpu; while (penv) { qemu_cpu_kick(penv);