All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: qemu-devel@nongnu.org
Cc: Paul Brook <paul@codesourcery.com>
Subject: Re: [Qemu-devel] [patch] Introduce per machine based max_cpu variable
Date: Tue, 30 Sep 2008 10:18:49 -0500	[thread overview]
Message-ID: <48E24359.9070607@codemonkey.ws> (raw)
In-Reply-To: <yq0prmlhdwg.fsf@jaguar.mkp.net>

Jes Sorensen wrote:
>>> Index: qemu/hw/an5206.c
>>> ===================================================================
>>> --- qemu.orig/hw/an5206.c +++ qemu/hw/an5206.c @@ -88,8 +88,9 @@
>>> static void an5206_init(ram_addr_t ram_s } QEMUMachine
>>> an5206_machine = { - "an5206", - "Arnewsh 5206", - an5206_init, -
>>> 512, + .name = "an5206", + .desc = "Arnewsh 5206", + .init =
>>> an5206_init, + .ram_require = 512, + .max_cpus = 1, };
>>>       
>
> Anthony> Your change would be greatly simplified if you defined
> Anthony> max_cpus to be such that it was the maximum number of vcpus -
> Anthony> 1.
>
> Anthony> Then the default value of 0 would be sufficient for most
> Anthony> machine types.
>
> Hi Anthony,
>
> I thought about this, but I think it's a really bad idea. It will
> cause confusion over time and I think it is quite reasonable to
> require all machines to define the maximum number of CPUs they
> support. Thats why I defined the error message so it was quite easy
> for anyone to fixup in case I got one of them wrong.
>
> I really think it's better to do this right than hack it.
>   

If it were 'max_cpu' then the meaning is pretty clear.  On a UP system, 
the max_cpu is 0.

You could also make it max_aps which makes it even more clear.  A UP 
system doesn't have any APs.

The other option is to have max_cpus == 0 be equivalent to max_cpus == 
1.  But don't print anything.  Basically, I don't like the idea of 
modifying every machine definition when they all have almost the exact 
same value for the field.

Regards,

Anthony Liguori

  reply	other threads:[~2008-09-30 15:19 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-23 11:44 [Qemu-devel] [patch] move MAX_CPUS to cpu.h Jes Sorensen
2008-09-23 12:08 ` Paul Brook
2008-09-23 12:10   ` Jes Sorensen
2008-09-23 12:50     ` Paul Brook
2008-09-23 12:53       ` Jes Sorensen
2008-09-23 13:04         ` Paul Brook
2008-09-23 13:10           ` Jes Sorensen
2008-09-25 15:21           ` [Qemu-devel] [patch] Introduce per machine based max_cpu variable Jes Sorensen
2008-09-30 14:47             ` Anthony Liguori
2008-09-30 15:06               ` Jes Sorensen
2008-09-30 15:18                 ` Anthony Liguori [this message]
2008-10-01 13:22                   ` Jes Sorensen
2008-09-30 15:19               ` Jes Sorensen
2008-10-02 15:45             ` Paul Brook
2008-10-03  9:40               ` Jes Sorensen
2008-09-23 14:13       ` [Qemu-devel] [patch] move MAX_CPUS to cpu.h M. Warner Losh

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=48E24359.9070607@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=paul@codesourcery.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.