* [PATCH 0/2] qemu-options: Trivial doc fixes related to -smp
@ 2021-09-28 9:31 Yanan Wang
2021-09-28 9:31 ` [PATCH 1/2] qemu-options: Tweak [, maxcpus=cpus] to [, maxcpus=maxcpus] Yanan Wang
2021-09-28 9:31 ` [PATCH 2/2] qemu-options: Add missing "sockets=2" to CLI "-smp 2" Yanan Wang
0 siblings, 2 replies; 9+ messages in thread
From: Yanan Wang @ 2021-09-28 9:31 UTC (permalink / raw)
To: qemu-devel, qemu-trivial
Cc: Yanan Wang, wanghaibin.wang, Andrew Jones,
Daniel P . Berrangé,
Laurent Vivier
There are two places found related to -smp that may need to be fixed
when reading qemu-options.hx. And after searching other Doc files,
there hasn't been any other similar issues.
Yanan Wang (2):
qemu-options: Tweak [,maxcpus=cpus] to [,maxcpus=maxcpus]
qemu-options: Add missing "sockets=2" to CLI "-smp 2"
qemu-options.hx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--
2.19.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/2] qemu-options: Tweak [, maxcpus=cpus] to [, maxcpus=maxcpus]
2021-09-28 9:31 [PATCH 0/2] qemu-options: Trivial doc fixes related to -smp Yanan Wang
@ 2021-09-28 9:31 ` Yanan Wang
2021-09-28 10:40 ` Damien Hedde
2021-09-28 9:31 ` [PATCH 2/2] qemu-options: Add missing "sockets=2" to CLI "-smp 2" Yanan Wang
1 sibling, 1 reply; 9+ messages in thread
From: Yanan Wang @ 2021-09-28 9:31 UTC (permalink / raw)
To: qemu-devel, qemu-trivial
Cc: Yanan Wang, wanghaibin.wang, Andrew Jones,
Daniel P . Berrangé,
Laurent Vivier
In qemu-option.hx, there is "-smp [[cpus=]n][,maxcpus=cpus]..." in the
DEF part, and "-smp [[cpus=]n][,maxcpus=maxcpus]..." in the RST part.
Obviously the later is right, let's fix the previous one.
Signed-off-by: Yanan Wang <wangyanan55@huawei.com>
---
qemu-options.hx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qemu-options.hx b/qemu-options.hx
index 5c1b0311c0..dcd9595650 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -200,7 +200,7 @@ SRST
ERST
DEF("smp", HAS_ARG, QEMU_OPTION_smp,
- "-smp [[cpus=]n][,maxcpus=cpus][,sockets=sockets][,dies=dies][,cores=cores][,threads=threads]\n"
+ "-smp [[cpus=]n][,maxcpus=maxcpus][,sockets=sockets][,dies=dies][,cores=cores][,threads=threads]\n"
" set the number of CPUs to 'n' [default=1]\n"
" maxcpus= maximum number of total CPUs, including\n"
" offline CPUs for hotplug, etc\n"
--
2.19.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/2] qemu-options: Add missing "sockets=2" to CLI "-smp 2"
2021-09-28 9:31 [PATCH 0/2] qemu-options: Trivial doc fixes related to -smp Yanan Wang
2021-09-28 9:31 ` [PATCH 1/2] qemu-options: Tweak [, maxcpus=cpus] to [, maxcpus=maxcpus] Yanan Wang
@ 2021-09-28 9:31 ` Yanan Wang
2021-09-28 10:46 ` Philippe Mathieu-Daudé
1 sibling, 1 reply; 9+ messages in thread
From: Yanan Wang @ 2021-09-28 9:31 UTC (permalink / raw)
To: qemu-devel, qemu-trivial
Cc: Yanan Wang, wanghaibin.wang, Andrew Jones,
Daniel P . Berrangé,
Laurent Vivier
There is one example of -smp CLI in qemu-options.hx currently
using "-smp 2" and assuming that there will be 2 sockets.
However now the actually calculation logic of missing sockets
and cores is not immutable, we should use more explicit CLIs
like "-smp 2,sockets=2" if we want multiple sockets.
Signed-off-by: Yanan Wang <wangyanan55@huawei.com>
---
qemu-options.hx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qemu-options.hx b/qemu-options.hx
index dcd9595650..ff8917c5e1 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -395,7 +395,7 @@ SRST
-m 2G \
-object memory-backend-ram,size=1G,id=m0 \
-object memory-backend-ram,size=1G,id=m1 \
- -smp 2 \
+ -smp 2,sockets=2,maxcpus=2 \
-numa node,nodeid=0,memdev=m0 \
-numa node,nodeid=1,memdev=m1,initiator=0 \
-numa cpu,node-id=0,socket-id=0 \
--
2.19.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] qemu-options: Tweak [, maxcpus=cpus] to [, maxcpus=maxcpus]
2021-09-28 9:31 ` [PATCH 1/2] qemu-options: Tweak [, maxcpus=cpus] to [, maxcpus=maxcpus] Yanan Wang
@ 2021-09-28 10:40 ` Damien Hedde
0 siblings, 0 replies; 9+ messages in thread
From: Damien Hedde @ 2021-09-28 10:40 UTC (permalink / raw)
To: Yanan Wang, qemu-devel, qemu-trivial
Cc: wanghaibin.wang, Andrew Jones, Daniel P . Berrangé, Laurent Vivier
On 9/28/21 11:31, Yanan Wang wrote:
> In qemu-option.hx, there is "-smp [[cpus=]n][,maxcpus=cpus]..." in the
> DEF part, and "-smp [[cpus=]n][,maxcpus=maxcpus]..." in the RST part.
> Obviously the later is right, let's fix the previous one.
>
> Signed-off-by: Yanan Wang <wangyanan55@huawei.com>
> ---
Reviewed-by: Damien Hedde <damien.hedde@greensocs.com>
> qemu-options.hx | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/qemu-options.hx b/qemu-options.hx
> index 5c1b0311c0..dcd9595650 100644
> --- a/qemu-options.hx
> +++ b/qemu-options.hx
> @@ -200,7 +200,7 @@ SRST
> ERST
>
> DEF("smp", HAS_ARG, QEMU_OPTION_smp,
> - "-smp [[cpus=]n][,maxcpus=cpus][,sockets=sockets][,dies=dies][,cores=cores][,threads=threads]\n"
> + "-smp [[cpus=]n][,maxcpus=maxcpus][,sockets=sockets][,dies=dies][,cores=cores][,threads=threads]\n"
> " set the number of CPUs to 'n' [default=1]\n"
> " maxcpus= maximum number of total CPUs, including\n"
> " offline CPUs for hotplug, etc\n"
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] qemu-options: Add missing "sockets=2" to CLI "-smp 2"
2021-09-28 9:31 ` [PATCH 2/2] qemu-options: Add missing "sockets=2" to CLI "-smp 2" Yanan Wang
@ 2021-09-28 10:46 ` Philippe Mathieu-Daudé
2021-09-28 10:58 ` wangyanan (Y)
0 siblings, 1 reply; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-09-28 10:46 UTC (permalink / raw)
To: Yanan Wang, qemu-devel, qemu-trivial
Cc: wanghaibin.wang, Andrew Jones, Daniel P . Berrangé, Laurent Vivier
On 9/28/21 11:31, Yanan Wang wrote:
> There is one example of -smp CLI in qemu-options.hx currently
> using "-smp 2" and assuming that there will be 2 sockets.
> However now the actually calculation logic of missing sockets
> and cores is not immutable, we should use more explicit CLIs
> like "-smp 2,sockets=2" if we want multiple sockets.
>
> Signed-off-by: Yanan Wang <wangyanan55@huawei.com>
> ---
> qemu-options.hx | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/qemu-options.hx b/qemu-options.hx
> index dcd9595650..ff8917c5e1 100644
> --- a/qemu-options.hx
> +++ b/qemu-options.hx
> @@ -395,7 +395,7 @@ SRST
> -m 2G \
> -object memory-backend-ram,size=1G,id=m0 \
> -object memory-backend-ram,size=1G,id=m1 \
> - -smp 2 \
> + -smp 2,sockets=2,maxcpus=2 \
Is the addition of "maxcpus=2" intentional?
> -numa node,nodeid=0,memdev=m0 \
> -numa node,nodeid=1,memdev=m1,initiator=0 \
> -numa cpu,node-id=0,socket-id=0 \
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] qemu-options: Add missing "sockets=2" to CLI "-smp 2"
2021-09-28 10:46 ` Philippe Mathieu-Daudé
@ 2021-09-28 10:58 ` wangyanan (Y)
2021-09-28 11:01 ` Daniel P. Berrangé
0 siblings, 1 reply; 9+ messages in thread
From: wangyanan (Y) @ 2021-09-28 10:58 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel, qemu-trivial
Cc: wanghaibin.wang, Andrew Jones, Daniel P . Berrangé, Laurent Vivier
On 2021/9/28 18:46, Philippe Mathieu-Daudé wrote:
> On 9/28/21 11:31, Yanan Wang wrote:
>> There is one example of -smp CLI in qemu-options.hx currently
>> using "-smp 2" and assuming that there will be 2 sockets.
>> However now the actually calculation logic of missing sockets
>> and cores is not immutable, we should use more explicit CLIs
>> like "-smp 2,sockets=2" if we want multiple sockets.
>>
>> Signed-off-by: Yanan Wang <wangyanan55@huawei.com>
>> ---
>> qemu-options.hx | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/qemu-options.hx b/qemu-options.hx
>> index dcd9595650..ff8917c5e1 100644
>> --- a/qemu-options.hx
>> +++ b/qemu-options.hx
>> @@ -395,7 +395,7 @@ SRST
>> -m 2G \
>> -object memory-backend-ram,size=1G,id=m0 \
>> -object memory-backend-ram,size=1G,id=m1 \
>> - -smp 2 \
>> + -smp 2,sockets=2,maxcpus=2 \
> Is the addition of "maxcpus=2" intentional?
Yes, but it's not necessary IMO. I just wanted to keep consistency
with other numa config examples in the Doc. Should I remove it ?
Thanks,
Yanan
>> -numa node,nodeid=0,memdev=m0 \
>> -numa node,nodeid=1,memdev=m1,initiator=0 \
>> -numa cpu,node-id=0,socket-id=0 \
>>
> .
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] qemu-options: Add missing "sockets=2" to CLI "-smp 2"
2021-09-28 10:58 ` wangyanan (Y)
@ 2021-09-28 11:01 ` Daniel P. Berrangé
2021-09-28 11:42 ` wangyanan (Y)
0 siblings, 1 reply; 9+ messages in thread
From: Daniel P. Berrangé @ 2021-09-28 11:01 UTC (permalink / raw)
To: wangyanan (Y)
Cc: Andrew Jones, qemu-trivial, qemu-devel, Laurent Vivier,
wanghaibin.wang, Philippe Mathieu-Daudé
On Tue, Sep 28, 2021 at 06:58:20PM +0800, wangyanan (Y) wrote:
>
> On 2021/9/28 18:46, Philippe Mathieu-Daudé wrote:
> > On 9/28/21 11:31, Yanan Wang wrote:
> > > There is one example of -smp CLI in qemu-options.hx currently
> > > using "-smp 2" and assuming that there will be 2 sockets.
> > > However now the actually calculation logic of missing sockets
> > > and cores is not immutable, we should use more explicit CLIs
> > > like "-smp 2,sockets=2" if we want multiple sockets.
> > >
> > > Signed-off-by: Yanan Wang <wangyanan55@huawei.com>
> > > ---
> > > qemu-options.hx | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/qemu-options.hx b/qemu-options.hx
> > > index dcd9595650..ff8917c5e1 100644
> > > --- a/qemu-options.hx
> > > +++ b/qemu-options.hx
> > > @@ -395,7 +395,7 @@ SRST
> > > -m 2G \
> > > -object memory-backend-ram,size=1G,id=m0 \
> > > -object memory-backend-ram,size=1G,id=m1 \
> > > - -smp 2 \
> > > + -smp 2,sockets=2,maxcpus=2 \
> > Is the addition of "maxcpus=2" intentional?
> Yes, but it's not necessary IMO. I just wanted to keep consistency
> with other numa config examples in the Doc. Should I remove it ?
I think it makes sense to be explicit, because the numa config
works in terms of maxcpus when splitting cpus between nodes
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 :|
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] qemu-options: Add missing "sockets=2" to CLI "-smp 2"
2021-09-28 11:01 ` Daniel P. Berrangé
@ 2021-09-28 11:42 ` wangyanan (Y)
2021-09-28 11:49 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 9+ messages in thread
From: wangyanan (Y) @ 2021-09-28 11:42 UTC (permalink / raw)
To: Daniel P. Berrangé
Cc: Andrew Jones, qemu-trivial, qemu-devel, Laurent Vivier,
wanghaibin.wang, Philippe Mathieu-Daudé
On 2021/9/28 19:01, Daniel P. Berrangé wrote:
> On Tue, Sep 28, 2021 at 06:58:20PM +0800, wangyanan (Y) wrote:
>> On 2021/9/28 18:46, Philippe Mathieu-Daudé wrote:
>>> On 9/28/21 11:31, Yanan Wang wrote:
>>>> There is one example of -smp CLI in qemu-options.hx currently
>>>> using "-smp 2" and assuming that there will be 2 sockets.
>>>> However now the actually calculation logic of missing sockets
>>>> and cores is not immutable, we should use more explicit CLIs
>>>> like "-smp 2,sockets=2" if we want multiple sockets.
>>>>
>>>> Signed-off-by: Yanan Wang <wangyanan55@huawei.com>
>>>> ---
>>>> qemu-options.hx | 2 +-
>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/qemu-options.hx b/qemu-options.hx
>>>> index dcd9595650..ff8917c5e1 100644
>>>> --- a/qemu-options.hx
>>>> +++ b/qemu-options.hx
>>>> @@ -395,7 +395,7 @@ SRST
>>>> -m 2G \
>>>> -object memory-backend-ram,size=1G,id=m0 \
>>>> -object memory-backend-ram,size=1G,id=m1 \
>>>> - -smp 2 \
>>>> + -smp 2,sockets=2,maxcpus=2 \
>>> Is the addition of "maxcpus=2" intentional?
>> Yes, but it's not necessary IMO. I just wanted to keep consistency
>> with other numa config examples in the Doc. Should I remove it ?
> I think it makes sense to be explicit, because the numa config
> works in terms of maxcpus when splitting cpus between nodes
The statement of this numa config example actually assume that
there will be 2 cpus totally. Although based on behavior of the
smp parser we will get maxcpus=2, I also tend to keep it explicitly.
But I should update subject of this patch and the commit message.
Thanks,
Yanan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] qemu-options: Add missing "sockets=2" to CLI "-smp 2"
2021-09-28 11:42 ` wangyanan (Y)
@ 2021-09-28 11:49 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-09-28 11:49 UTC (permalink / raw)
To: wangyanan (Y), Daniel P. Berrangé
Cc: qemu-trivial, wanghaibin.wang, Andrew Jones, qemu-devel, Laurent Vivier
On 9/28/21 13:42, wangyanan (Y) wrote:
>
> On 2021/9/28 19:01, Daniel P. Berrangé wrote:
>> On Tue, Sep 28, 2021 at 06:58:20PM +0800, wangyanan (Y) wrote:
>>> On 2021/9/28 18:46, Philippe Mathieu-Daudé wrote:
>>>> On 9/28/21 11:31, Yanan Wang wrote:
>>>>> There is one example of -smp CLI in qemu-options.hx currently
>>>>> using "-smp 2" and assuming that there will be 2 sockets.
>>>>> However now the actually calculation logic of missing sockets
>>>>> and cores is not immutable, we should use more explicit CLIs
>>>>> like "-smp 2,sockets=2" if we want multiple sockets.
>>>>>
>>>>> Signed-off-by: Yanan Wang <wangyanan55@huawei.com>
>>>>> ---
>>>>> qemu-options.hx | 2 +-
>>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/qemu-options.hx b/qemu-options.hx
>>>>> index dcd9595650..ff8917c5e1 100644
>>>>> --- a/qemu-options.hx
>>>>> +++ b/qemu-options.hx
>>>>> @@ -395,7 +395,7 @@ SRST
>>>>> -m 2G \
>>>>> -object memory-backend-ram,size=1G,id=m0 \
>>>>> -object memory-backend-ram,size=1G,id=m1 \
>>>>> - -smp 2 \
>>>>> + -smp 2,sockets=2,maxcpus=2 \
>>>> Is the addition of "maxcpus=2" intentional?
>>> Yes, but it's not necessary IMO. I just wanted to keep consistency
>>> with other numa config examples in the Doc. Should I remove it ?
>> I think it makes sense to be explicit, because the numa config
>> works in terms of maxcpus when splitting cpus between nodes
> The statement of this numa config example actually assume that
> there will be 2 cpus totally. Although based on behavior of the
> smp parser we will get maxcpus=2, I also tend to keep it explicitly.
>
> But I should update subject of this patch and the commit message.
Once updated:
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-09-28 11:51 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-28 9:31 [PATCH 0/2] qemu-options: Trivial doc fixes related to -smp Yanan Wang
2021-09-28 9:31 ` [PATCH 1/2] qemu-options: Tweak [, maxcpus=cpus] to [, maxcpus=maxcpus] Yanan Wang
2021-09-28 10:40 ` Damien Hedde
2021-09-28 9:31 ` [PATCH 2/2] qemu-options: Add missing "sockets=2" to CLI "-smp 2" Yanan Wang
2021-09-28 10:46 ` Philippe Mathieu-Daudé
2021-09-28 10:58 ` wangyanan (Y)
2021-09-28 11:01 ` Daniel P. Berrangé
2021-09-28 11:42 ` wangyanan (Y)
2021-09-28 11:49 ` Philippe Mathieu-Daudé
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).