From: Peter Lieven <pl@kamp.de>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] vl: verify if combination of cpus, sockets, cores and threads is sane
Date: Fri, 22 Nov 2013 12:13:27 +0100 [thread overview]
Message-ID: <528F3C57.403@kamp.de> (raw)
In-Reply-To: <528F2EF8.9090509@redhat.com>
On 22.11.2013 11:16, Paolo Bonzini wrote:
> Il 21/11/2013 15:37, Peter Lieven ha scritto:
>> - max_cpus = qemu_opt_get_number(opts, "maxcpus", 0);
>> + if (cpus != sockets * cores * threads) {
>> + fprintf(stderr, "Illegal CPU layout: %d cpus with %d sockets,"
>> + " %d cores per socket and %d threads per core"
>> + " (cpus != sockets * cores * threads)\n",
>> + cpus, sockets, cores, threads);
>> + exit(1);
>> + }
> Should max_cpus be checked instead if non-zero?
>
> I see where you come from, but I think the potential for this patch to
> break some working configuration (for some definition of working) is too
> high. Can you split out the fixes to the "fill in the blanks" logic?
I can, but the number of sockets is logal to the parse function.
What would you think is it okay to just send a warning about
the illegal config and drop the exit(1).
Peter
next prev parent reply other threads:[~2013-11-22 11:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-21 14:37 [Qemu-devel] [PATCH] vl: verify if combination of cpus, sockets, cores and threads is sane Peter Lieven
2013-11-22 10:16 ` Paolo Bonzini
2013-11-22 11:13 ` Peter Lieven [this message]
2013-11-22 11:20 ` Paolo Bonzini
2013-11-22 14:43 ` Andreas Färber
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=528F3C57.403@kamp.de \
--to=pl@kamp.de \
--cc=aliguori@us.ibm.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@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.