From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44101) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boWA9-0006Ho-4u for qemu-devel@nongnu.org; Mon, 26 Sep 2016 09:41:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1boWA8-0004uz-As for qemu-devel@nongnu.org; Mon, 26 Sep 2016 09:41:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34614) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boWA8-0004um-4D for qemu-devel@nongnu.org; Mon, 26 Sep 2016 09:41:40 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9D2068535A for ; Mon, 26 Sep 2016 13:41:39 +0000 (UTC) Received: from donizetti.redhat.com (ovpn-112-31.ams2.redhat.com [10.36.112.31]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u8QDexeB009350 for ; Mon, 26 Sep 2016 09:41:38 -0400 From: Paolo Bonzini Date: Mon, 26 Sep 2016 15:40:51 +0200 Message-Id: <1474897258-1205-22-git-send-email-pbonzini@redhat.com> In-Reply-To: <1474897258-1205-1-git-send-email-pbonzini@redhat.com> References: <1474897258-1205-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 21/28] cpus-common: remove redundant call to exclusive_idle() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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. Reviewed-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e 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 115f3d4..80aaf9b 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_lock); } =20 diff --git a/docs/tcg-exclusive.promela b/docs/tcg-exclusive.promela index 5889b40..8bb0967 100644 --- a/docs/tcg-exclusive.promela +++ b/docs/tcg-exclusive.promela @@ -124,7 +124,6 @@ byte has_waiter[N_CPUS]; } = \ :: else -> skip; = \ fi; = \ - exclusive_idle(); = \ MUTEX_UNLOCK(mutex); =20 // Promela processes --=20 2.7.4