From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: Mike Day <ncmike@ncultra.org>, qemu-devel@nongnu.org
Cc: Paul Mackerras <paulus@samba.org>,
qemu-ppc@nongnu.org, Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] [RFC PATCH v2] PPC: smp: autodetect numbers of threads per core
Date: Fri, 10 Jan 2014 09:12:28 +1100 [thread overview]
Message-ID: <52CF1ECC.3040208@ozlabs.ru> (raw)
In-Reply-To: <87ppo0na45.fsf@pixel.localdomain>
On 01/10/2014 08:00 AM, Mike Day wrote:
>
> Alexey Kardashevskiy <aik@ozlabs.ru> 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
next prev parent reply other threads:[~2014-01-09 22:12 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-09 5:34 [Qemu-devel] [RFC PATCH v2] PPC: smp: autodetect numbers of threads per core Alexey Kardashevskiy
2014-01-09 21:00 ` Mike Day
2014-01-09 22:12 ` Alexey Kardashevskiy [this message]
2014-01-09 23:40 ` Alexander Graf
2014-01-10 1:39 ` Alexey Kardashevskiy
2014-01-10 13:03 ` Mike Day
2014-01-10 13:28 ` Alexander Graf
2014-01-10 13:42 ` Alexey Kardashevskiy
2014-01-10 14:00 ` Alexander Graf
2014-01-10 14:13 ` Alexey Kardashevskiy
2014-01-10 14:20 ` Alexander Graf
2014-01-10 14:21 ` Mike Day
2014-01-10 14:25 ` Alexander Graf
2014-01-10 14:29 ` Mike Day
2014-01-10 14:35 ` Alexey Kardashevskiy
2014-01-10 14:12 ` Mike Day
2014-01-09 22:50 ` Scott Wood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52CF1ECC.3040208@ozlabs.ru \
--to=aik@ozlabs.ru \
--cc=agraf@suse.de \
--cc=ncmike@ncultra.org \
--cc=paulus@samba.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.