From patchwork Mon Sep 12 11:12:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 668753 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sXmCS2NRFz9sRZ for ; Mon, 12 Sep 2016 21:43:16 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=TbfyjIUe; dkim-atps=neutral Received: from localhost ([::1]:41879 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjPdp-0000VH-Vu for incoming@patchwork.ozlabs.org; Mon, 12 Sep 2016 07:43:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35862) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjPBy-0002LO-01 for qemu-devel@nongnu.org; Mon, 12 Sep 2016 07:14:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bjPBx-0007nj-3J for qemu-devel@nongnu.org; Mon, 12 Sep 2016 07:14:25 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:33975) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjPBw-0007g0-SB for qemu-devel@nongnu.org; Mon, 12 Sep 2016 07:14:24 -0400 Received: by mail-wm0-f67.google.com with SMTP id g141so2088696wmd.1 for ; Mon, 12 Sep 2016 04:14:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=7+Daim/IqNYfGBJyC7GVVvQRaSC4zBAOurcuqm/fs9Q=; b=TbfyjIUefx4Dm+nt+SBeftinks6POAhuR/PKy9sbi5tObOIHZTIaR45I50HemFNaV4 ZxPK3Bppd4MFpnf8Gqm7voT6581pVJPxEWBiLVkP7T5xX26tGY9Le4LC+aQFNeU1HJiG Os+rTaUk8pTnifc/Y5NKVVdrC8VLizeNrj8nRvjSjuSVBvCvLDVuwllxtMnY1IDfu/qx dW5sdi49Ws/G2nZ8ZfYcI60PD70bxvnwSLeBpWv0ksQuZmBCmddm7J1HLDc1dDD4h+q7 TgEGI9O2nZT/PLKmDA8bjGl57E78BfAHFHBmdPJUPi1uJSMU9I8pSkFkzKagZ6Rf47sF RUnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=7+Daim/IqNYfGBJyC7GVVvQRaSC4zBAOurcuqm/fs9Q=; b=XT36wGKltO3AsuL08JaP213CLe72cU7S5yblcJy3Zk7HEnZF30u7WfcUeHmXFF/mZU fmU4JMWdfxfHQHsh+G+jr7TZ3pjwFueX5ar2fZ831HTWbQE7nyCgLAhItFXDgEj84ipo zOj6g1YpQc7vTBgXZus+TtPSshd/qf+2++GFeG/hPECvLgtEQHZsUnfhqeUrXnuRT07n Tg/XMcYrEypaNay76FXozq3v0O63qTVIhk5HffJfVSnrejMUL9vYjet2EeUvMY39r1BY Pk624GY0qKx/2wTzu6257tbBnsCBdHscob6Zs8rGrhK+ugx4Fi3N2exMrRiY0A8fHde2 FIQA== X-Gm-Message-State: AE9vXwNFKH7rZ4BaEADsIDeYRN3No2ym6sA7dCSbXoLONRR87xl+kfCRmoqAyRCJamRuLA== X-Received: by 10.194.95.36 with SMTP id dh4mr14431834wjb.156.1473678783157; Mon, 12 Sep 2016 04:13:03 -0700 (PDT) Received: from donizetti.redhat.com (94-39-180-254.adsl-ull.clienti.tiscali.it. [94.39.180.254]) by smtp.gmail.com with ESMTPSA id n131sm17339231wmd.3.2016.09.12.04.13.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Sep 2016 04:13:02 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Mon, 12 Sep 2016 13:12:37 +0200 Message-Id: <1473678761-8885-13-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1473678761-8885-1-git-send-email-pbonzini@redhat.com> References: <1473678761-8885-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 74.125.82.67 Subject: [Qemu-devel] [PATCH 12/16] cpus-common: remove redundant call to exclusive_idle() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alex.bennee@linaro.org, sergey.fedorov@linaro.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" No need to call exclusive_idle() from cpu_exec_end since it is done immediately afterwards in cpu_exec_start. Any exclusive section could run as soon as cpu_exec_end leaves, because cpu->running is false and the mutex is not taken, so the call does not add any protection either. Signed-off-by: Paolo Bonzini --- cpus-common.c | 1 - docs/tcg-exclusive.promela | 1 - 2 files changed, 2 deletions(-) diff --git a/cpus-common.c b/cpus-common.c index 09b19f8..cabcb9f 100644 --- a/cpus-common.c +++ b/cpus-common.c @@ -221,7 +221,6 @@ void cpu_exec_end(CPUState *cpu) qemu_cond_signal(&exclusive_cond); } } - exclusive_idle(); qemu_mutex_unlock(&qemu_cpu_list_mutex); } diff --git a/docs/tcg-exclusive.promela b/docs/tcg-exclusive.promela index 4c57398..7793e31 100644 --- a/docs/tcg-exclusive.promela +++ b/docs/tcg-exclusive.promela @@ -123,7 +123,6 @@ byte has_waiter[N_CPUS]; } \ :: else -> skip; \ fi; \ - exclusive_idle(); \ MUTEX_UNLOCK(mutex); // Promela processes