From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32858) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bi26O-0003xa-Hh for qemu-devel@nongnu.org; Thu, 08 Sep 2016 12:23:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bi26K-0005Sp-Ho for qemu-devel@nongnu.org; Thu, 08 Sep 2016 12:23:00 -0400 Received: from mail-yb0-x241.google.com ([2607:f8b0:4002:c09::241]:33362) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bi26K-0005Sb-Dh for qemu-devel@nongnu.org; Thu, 08 Sep 2016 12:22:56 -0400 Received: by mail-yb0-x241.google.com with SMTP id x93so1149514ybh.0 for ; Thu, 08 Sep 2016 09:22:56 -0700 (PDT) Sender: Richard Henderson References: <1467392693-22715-1-git-send-email-rth@twiddle.net> <1467392693-22715-9-git-send-email-rth@twiddle.net> <8737lazsxt.fsf@linaro.org> From: Richard Henderson Message-ID: <942b7251-8c04-4d26-691d-e7e449f3767b@twiddle.net> Date: Thu, 8 Sep 2016 09:22:40 -0700 MIME-Version: 1.0 In-Reply-To: <8737lazsxt.fsf@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v2 08/27] HACK: Always enable parallel_cpus List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Alex_Benn=c3=a9e?= Cc: qemu-devel@nongnu.org, cota@braap.org, pbonzini@redhat.com, peter.maydell@linaro.org, serge.fdrv@gmail.com On 09/08/2016 01:39 AM, Alex Bennée wrote: > > Richard Henderson writes: > >> This is really just a placeholder for an actual >> command-line switch for mttcg. >> --- >> translate-all.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/translate-all.c b/translate-all.c >> index 99ae7f9..a10fa06 100644 >> --- a/translate-all.c >> +++ b/translate-all.c >> @@ -119,7 +119,7 @@ static void *l1_map[V_L1_SIZE]; >> >> /* code generation context */ >> TCGContext tcg_ctx; >> -bool parallel_cpus; >> +bool parallel_cpus = 1; > > I appreciate this is currently a hack but for CONFIG_USER it should > always be true anyway. One could delay setting parallel_cpus until one of a number of syscalls occur: (1) clone, with CLONE_VM (2) mmap, with MAP_SHARED (3) shmat which would allow single-threaded programs to run without the atomic overhead. r~