qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH v2] PPC: smp: autodetect numbers of threads


From: Alexander Graf
Subject: Re: [Qemu-devel] [RFC PATCH v2] PPC: smp: autodetect numbers of threads per core
Date: Fri, 10 Jan 2014 00:40:26 +0100


> Am 09.01.2014 um 23:12 schrieb Alexey Kardashevskiy <address@hidden>:
> 
>> On 01/10/2014 08:00 AM, Mike Day wrote:
>> 
>> Alexey Kardashevskiy <address@hidden> writes:
>> 
>>>         /* compute missing values, prefer sockets over cores over threads */
>>>         if (cpus == 0 || sockets == 0) {
>>>             sockets = sockets > 0 ? sockets : 1;
>>>             cores = cores > 0 ? cores : 1;
>>> -            threads = threads > 0 ? threads : 1;
>>> +            if (threads_max) {
>>> +                if (threads > 0) {
>>> +                    fprintf(stderr, "Use either threads or threads_max\n");
>>> +                    exit(1);
>> 
>> If you went ahead with the threads="max" string option you wouldn't need
>> to check here for mutual excusivity and the user wouldn't need to worry
>> about an extra command options.
> 
> 
> Is this the only concern and the rest is fine and can go to upstream? If
> so, I'll fix it and repost.

What if we make the max thread count a property of our cpu class? The we can 
add a threads=max option which will be identical between kvm and tcg.

Overall I'm not yet fully convinced this whole idea is eventually going to 
improve the situation though.


Alex

> 
> 
>>> +                }
>>> +                threads = smp_threads > 0 ? smp_threads : 1;
>>> +            } else {
>>> +                threads = threads > 0 ? threads : 1;
>>> +            }
>>>             if (cpus == 0) {
>>>                 cpus = cores * threads * sockets;
>>>             }
> 
> 
> -- 
> Alexey



reply via email to

[Prev in Thread] Current Thread [Next in Thread]