[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 1/6] machine: Set the value of maxcpus to match cpus if s
From: |
Daniel P . Berrangé |
Subject: |
Re: [RFC PATCH 1/6] machine: Set the value of maxcpus to match cpus if specified as zero |
Date: |
Mon, 12 Jul 2021 16:27:26 +0100 |
User-agent: |
Mutt/2.0.7 (2021-05-04) |
On Mon, Jul 12, 2021 at 04:57:37PM +0200, Andrew Jones wrote:
> On Fri, Jul 02, 2021 at 06:07:34PM +0800, Yanan Wang wrote:
> > It is currently allowed to explicitly specified the topology parameters
> > as 0 in the -smp cmdlines, such as -smp cpus=8,maxcpus=0,sockets=0. And
> > for the values of cpus/sockets/cores/threads, we always determine that
> > they are ommited if either set to 0 in the cmdline(e.g. sockets=0) or
> > just not explicitly specified, then we compute the ommited values.
> >
> > We probably should also treat "maxcpus=0" as ommited and then set the
> > value to match smp cpus. This makes cmdlines like "-smp 8, maxcpus=0"
> > start to work as "-smp 8,maxcpus=8,sockets=8,cores=1,threads=1".
> >
> > Note that this patch won't affect any existing working cmdlines, but
> > will allow configuration like "-smp cpus=n,maxcpus=0" to be valid.
>
> Personally, I'd rather see -smp cpus=n,sockets=0 become an error than to
> "fix" -smp cpus=n,maxcpus=0.
Yes, a value of 0 is not really something a user should ever be explicitly
setting. It is purely an internal default that is used by QEMU to identify
when it needs to auto-fill a value.
A user should give a non-zero value, or omit the parameter entirely
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
- Re: [RFC PATCH 5/6] pc/machine: Disallow any configuration of dies for non-PC machines, (continued)