[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] [RFC PATCH v2] PPC: smp: autodetect numbers
From: |
Alexey Kardashevskiy |
Subject: |
Re: [Qemu-ppc] [Qemu-devel] [RFC PATCH v2] PPC: smp: autodetect numbers of threads per core |
Date: |
Fri, 10 Jan 2014 09:12:28 +1100 |
User-agent: |
Mozilla/5.0 (X11; Linux i686 on x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 |
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.
>> + }
>> + threads = smp_threads > 0 ? smp_threads : 1;
>> + } else {
>> + threads = threads > 0 ? threads : 1;
>> + }
>> if (cpus == 0) {
>> cpus = cores * threads * sockets;
>> }
>
--
Alexey
- [Qemu-ppc] [RFC PATCH v2] PPC: smp: autodetect numbers of threads per core, Alexey Kardashevskiy, 2014/01/09
- Re: [Qemu-ppc] [Qemu-devel] [RFC PATCH v2] PPC: smp: autodetect numbers of threads per core, Mike Day, 2014/01/09
- Re: [Qemu-ppc] [Qemu-devel] [RFC PATCH v2] PPC: smp: autodetect numbers of threads per core,
Alexey Kardashevskiy <=
- Re: [Qemu-ppc] [Qemu-devel] [RFC PATCH v2] PPC: smp: autodetect numbers of threads per core, Alexander Graf, 2014/01/09
- Re: [Qemu-ppc] [Qemu-devel] [RFC PATCH v2] PPC: smp: autodetect numbers of threads per core, Alexey Kardashevskiy, 2014/01/09
- Re: [Qemu-ppc] [Qemu-devel] [RFC PATCH v2] PPC: smp: autodetect numbers of threads per core, Mike Day, 2014/01/10
- Re: [Qemu-ppc] [Qemu-devel] [RFC PATCH v2] PPC: smp: autodetect numbers of threads per core, Alexander Graf, 2014/01/10
- Re: [Qemu-ppc] [Qemu-devel] [RFC PATCH v2] PPC: smp: autodetect numbers of threads per core, Alexey Kardashevskiy, 2014/01/10
- Re: [Qemu-ppc] [Qemu-devel] [RFC PATCH v2] PPC: smp: autodetect numbers of threads per core, Alexander Graf, 2014/01/10
- Re: [Qemu-ppc] [Qemu-devel] [RFC PATCH v2] PPC: smp: autodetect numbers of threads per core, Alexey Kardashevskiy, 2014/01/10
- Re: [Qemu-ppc] [Qemu-devel] [RFC PATCH v2] PPC: smp: autodetect numbers of threads per core, Alexander Graf, 2014/01/10
- Re: [Qemu-ppc] [Qemu-devel] [RFC PATCH v2] PPC: smp: autodetect numbers of threads per core, Mike Day, 2014/01/10
- Re: [Qemu-ppc] [Qemu-devel] [RFC PATCH v2] PPC: smp: autodetect numbers of threads per core, Alexander Graf, 2014/01/10