Richard Henderson <r...@twiddle.net> writes:

> On 11/09/2016 03:57 PM, Alex Bennée wrote:
>> +    if (qemu_tcg_mttcg_enabled() || !single_tcg_cpu_thread) {
>> +        parallel_cpus = true;
>
> Why are we setting this here,
>
>>          cpu->thread = g_malloc0(sizeof(QemuThread));
>>          cpu->halt_cond = g_malloc0(sizeof(QemuCond));
>>          qemu_cond_init(cpu->halt_cond);
>> +
>> +        if (qemu_tcg_mttcg_enabled()) {
>> +            /* create a thread per vCPU with TCG (MTTCG) */
>
> and not here?

Good point, I'll fix that.

>
>> +            snprintf(thread_name, VCPU_THREAD_NAME_SIZE, "CPU %d/TCG",
>>                   cpu->cpu_index);
>> -        qemu_thread_create(cpu->thread, thread_name, qemu_tcg_cpu_thread_fn,
>> -                           cpu, QEMU_THREAD_JOINABLE);
>> +
>> +            qemu_thread_create(cpu->thread, thread_name, 
>> qemu_tcg_cpu_thread_fn,
>> +                               cpu, QEMU_THREAD_JOINABLE);
>> +
>> +        } else {
>> +            /* share a single thread for all cpus with TCG */
>> +            snprintf(thread_name, VCPU_THREAD_NAME_SIZE, "ALL CPUs/TCG");
>> +            qemu_thread_create(cpu->thread, thread_name,
>
> Otherwise,
>
> Reviewed-by: Richard Henderson <r...@twiddle.net>
>
>
> r~


--
Alex Bennée

Reply via email to