[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 08/27] HACK: Always enable parallel_cpus
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH v2 08/27] HACK: Always enable parallel_cpus |
Date: |
Thu, 8 Sep 2016 09:22:40 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
On 09/08/2016 01:39 AM, Alex Bennée wrote:
>
> Richard Henderson <address@hidden> 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~