* [PATCH v2 0/2] qemu-options: Trivial doc fixes related to -smp
@ 2021-09-28 12:11 Yanan Wang
2021-09-28 12:11 ` [PATCH v2 1/2] qemu-options: Tweak [, maxcpus=cpus] to [, maxcpus=maxcpus] Yanan Wang
2021-09-28 12:11 ` [PATCH v2 2/2] qemu-options: Add missing "sockets=2, maxcpus=2" to CLI "-smp 2" Yanan Wang
0 siblings, 2 replies; 9+ messages in thread
From: Yanan Wang @ 2021-09-28 12:11 UTC (permalink / raw)
To: qemu-devel, qemu-trivial
Cc: Yanan Wang, wanghaibin.wang, Andrew Jones,
Daniel P . Berrangé,
Laurent Vivier
v1->v2:
- update the subject and commit message of patch 2/2.
- add R-bs from Damien and Philippe. Thanks.
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,maxcpus=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 v2 1/2] qemu-options: Tweak [, maxcpus=cpus] to [, maxcpus=maxcpus]
2021-09-28 12:11 [PATCH v2 0/2] qemu-options: Trivial doc fixes related to -smp Yanan Wang
@ 2021-09-28 12:11 ` Yanan Wang
2021-09-28 12:28 ` [PATCH v2 1/2] qemu-options: Tweak [,maxcpus=cpus] to [,maxcpus=maxcpus] Daniel P. Berrangé
` (2 more replies)
2021-09-28 12:11 ` [PATCH v2 2/2] qemu-options: Add missing "sockets=2, maxcpus=2" to CLI "-smp 2" Yanan Wang
1 sibling, 3 replies; 9+ messages in thread
From: Yanan Wang @ 2021-09-28 12:11 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>
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"
--
2.19.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 2/2] qemu-options: Add missing "sockets=2, maxcpus=2" to CLI "-smp 2"
2021-09-28 12:11 [PATCH v2 0/2] qemu-options: Trivial doc fixes related to -smp Yanan Wang
2021-09-28 12:11 ` [PATCH v2 1/2] qemu-options: Tweak [, maxcpus=cpus] to [, maxcpus=maxcpus] Yanan Wang
@ 2021-09-28 12:11 ` Yanan Wang
2021-09-28 12:28 ` [PATCH v2 2/2] qemu-options: Add missing "sockets=2,maxcpus=2" " Daniel P. Berrangé
` (2 more replies)
1 sibling, 3 replies; 9+ messages in thread
From: Yanan Wang @ 2021-09-28 12:11 UTC (permalink / raw)
To: qemu-devel, qemu-trivial
Cc: Yanan Wang, wanghaibin.wang, Andrew Jones,
Daniel P . Berrangé,
Laurent Vivier
There is one numa config example in qemu-options.hx currently
using "-smp 2" and assuming that there will be 2 sockets and
2 cpus totally. However now the actual calculation logic of
missing sockets and cores is not immutable and is considered
liable to change. Although we will get maxcpus=2 finally based
on current parser, it's always stable to specify it explicitly.
So "-smp 2,sockets=2,maxcpus=2" will be optimal when we expect
multiple sockets and 2 cpus totally.
Signed-off-by: Yanan Wang <wangyanan55@huawei.com>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.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 v2 1/2] qemu-options: Tweak [,maxcpus=cpus] to [,maxcpus=maxcpus]
2021-09-28 12:11 ` [PATCH v2 1/2] qemu-options: Tweak [, maxcpus=cpus] to [, maxcpus=maxcpus] Yanan Wang
@ 2021-09-28 12:28 ` Daniel P. Berrangé
2021-09-29 14:38 ` Andrew Jones
2021-09-29 14:55 ` [PATCH v2 1/2] qemu-options: Tweak [, maxcpus=cpus] to [, maxcpus=maxcpus] Laurent Vivier
2 siblings, 0 replies; 9+ messages in thread
From: Daniel P. Berrangé @ 2021-09-28 12:28 UTC (permalink / raw)
To: Yanan Wang
Cc: qemu-trivial, wanghaibin.wang, Andrew Jones, qemu-devel, Laurent Vivier
On Tue, Sep 28, 2021 at 08:11:33PM +0800, 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(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
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 v2 2/2] qemu-options: Add missing "sockets=2,maxcpus=2" to CLI "-smp 2"
2021-09-28 12:11 ` [PATCH v2 2/2] qemu-options: Add missing "sockets=2, maxcpus=2" to CLI "-smp 2" Yanan Wang
@ 2021-09-28 12:28 ` Daniel P. Berrangé
2021-09-29 14:38 ` Andrew Jones
2021-09-29 14:55 ` [PATCH v2 2/2] qemu-options: Add missing "sockets=2, maxcpus=2" " Laurent Vivier
2 siblings, 0 replies; 9+ messages in thread
From: Daniel P. Berrangé @ 2021-09-28 12:28 UTC (permalink / raw)
To: Yanan Wang
Cc: qemu-trivial, wanghaibin.wang, Andrew Jones, qemu-devel, Laurent Vivier
On Tue, Sep 28, 2021 at 08:11:34PM +0800, Yanan Wang wrote:
> There is one numa config example in qemu-options.hx currently
> using "-smp 2" and assuming that there will be 2 sockets and
> 2 cpus totally. However now the actual calculation logic of
> missing sockets and cores is not immutable and is considered
> liable to change. Although we will get maxcpus=2 finally based
> on current parser, it's always stable to specify it explicitly.
>
> So "-smp 2,sockets=2,maxcpus=2" will be optimal when we expect
> multiple sockets and 2 cpus totally.
>
> Signed-off-by: Yanan Wang <wangyanan55@huawei.com>
> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
> ---
> qemu-options.hx | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
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 v2 1/2] qemu-options: Tweak [,maxcpus=cpus] to [,maxcpus=maxcpus]
2021-09-28 12:11 ` [PATCH v2 1/2] qemu-options: Tweak [, maxcpus=cpus] to [, maxcpus=maxcpus] Yanan Wang
2021-09-28 12:28 ` [PATCH v2 1/2] qemu-options: Tweak [,maxcpus=cpus] to [,maxcpus=maxcpus] Daniel P. Berrangé
@ 2021-09-29 14:38 ` Andrew Jones
2021-09-29 14:55 ` [PATCH v2 1/2] qemu-options: Tweak [, maxcpus=cpus] to [, maxcpus=maxcpus] Laurent Vivier
2 siblings, 0 replies; 9+ messages in thread
From: Andrew Jones @ 2021-09-29 14:38 UTC (permalink / raw)
To: Yanan Wang
Cc: qemu-trivial, wanghaibin.wang, Daniel P . Berrangé,
qemu-devel, Laurent Vivier
On Tue, Sep 28, 2021 at 08:11:33PM +0800, 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"
> --
> 2.19.1
>
Reviewed-by: Andrew Jones <drjones@redhat.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 2/2] qemu-options: Add missing "sockets=2,maxcpus=2" to CLI "-smp 2"
2021-09-28 12:11 ` [PATCH v2 2/2] qemu-options: Add missing "sockets=2, maxcpus=2" to CLI "-smp 2" Yanan Wang
2021-09-28 12:28 ` [PATCH v2 2/2] qemu-options: Add missing "sockets=2,maxcpus=2" " Daniel P. Berrangé
@ 2021-09-29 14:38 ` Andrew Jones
2021-09-29 14:55 ` [PATCH v2 2/2] qemu-options: Add missing "sockets=2, maxcpus=2" " Laurent Vivier
2 siblings, 0 replies; 9+ messages in thread
From: Andrew Jones @ 2021-09-29 14:38 UTC (permalink / raw)
To: Yanan Wang
Cc: qemu-trivial, wanghaibin.wang, Daniel P . Berrangé,
qemu-devel, Laurent Vivier
On Tue, Sep 28, 2021 at 08:11:34PM +0800, Yanan Wang wrote:
> There is one numa config example in qemu-options.hx currently
> using "-smp 2" and assuming that there will be 2 sockets and
> 2 cpus totally. However now the actual calculation logic of
> missing sockets and cores is not immutable and is considered
> liable to change. Although we will get maxcpus=2 finally based
> on current parser, it's always stable to specify it explicitly.
>
> So "-smp 2,sockets=2,maxcpus=2" will be optimal when we expect
> multiple sockets and 2 cpus totally.
>
> Signed-off-by: Yanan Wang <wangyanan55@huawei.com>
> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.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
>
Reviewed-by: Andrew Jones <drjones@redhat.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/2] qemu-options: Tweak [, maxcpus=cpus] to [, maxcpus=maxcpus]
2021-09-28 12:11 ` [PATCH v2 1/2] qemu-options: Tweak [, maxcpus=cpus] to [, maxcpus=maxcpus] Yanan Wang
2021-09-28 12:28 ` [PATCH v2 1/2] qemu-options: Tweak [,maxcpus=cpus] to [,maxcpus=maxcpus] Daniel P. Berrangé
2021-09-29 14:38 ` Andrew Jones
@ 2021-09-29 14:55 ` Laurent Vivier
2 siblings, 0 replies; 9+ messages in thread
From: Laurent Vivier @ 2021-09-29 14:55 UTC (permalink / raw)
To: Yanan Wang, qemu-devel, qemu-trivial
Cc: wanghaibin.wang, Andrew Jones, Daniel P . Berrangé
Le 28/09/2021 à 14:11, Yanan Wang a écrit :
> 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"
>
Applied to my trivial-patches branch.
Thanks,
Laurent
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 2/2] qemu-options: Add missing "sockets=2, maxcpus=2" to CLI "-smp 2"
2021-09-28 12:11 ` [PATCH v2 2/2] qemu-options: Add missing "sockets=2, maxcpus=2" to CLI "-smp 2" Yanan Wang
2021-09-28 12:28 ` [PATCH v2 2/2] qemu-options: Add missing "sockets=2,maxcpus=2" " Daniel P. Berrangé
2021-09-29 14:38 ` Andrew Jones
@ 2021-09-29 14:55 ` Laurent Vivier
2 siblings, 0 replies; 9+ messages in thread
From: Laurent Vivier @ 2021-09-29 14:55 UTC (permalink / raw)
To: Yanan Wang, qemu-devel, qemu-trivial
Cc: wanghaibin.wang, Andrew Jones, Daniel P . Berrangé
Le 28/09/2021 à 14:11, Yanan Wang a écrit :
> There is one numa config example in qemu-options.hx currently
> using "-smp 2" and assuming that there will be 2 sockets and
> 2 cpus totally. However now the actual calculation logic of
> missing sockets and cores is not immutable and is considered
> liable to change. Although we will get maxcpus=2 finally based
> on current parser, it's always stable to specify it explicitly.
>
> So "-smp 2,sockets=2,maxcpus=2" will be optimal when we expect
> multiple sockets and 2 cpus totally.
>
> Signed-off-by: Yanan Wang <wangyanan55@huawei.com>
> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.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 \
>
Applied to my trivial-patches branch.
Thanks,
Laurent
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-09-29 14:57 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-28 12:11 [PATCH v2 0/2] qemu-options: Trivial doc fixes related to -smp Yanan Wang
2021-09-28 12:11 ` [PATCH v2 1/2] qemu-options: Tweak [, maxcpus=cpus] to [, maxcpus=maxcpus] Yanan Wang
2021-09-28 12:28 ` [PATCH v2 1/2] qemu-options: Tweak [,maxcpus=cpus] to [,maxcpus=maxcpus] Daniel P. Berrangé
2021-09-29 14:38 ` Andrew Jones
2021-09-29 14:55 ` [PATCH v2 1/2] qemu-options: Tweak [, maxcpus=cpus] to [, maxcpus=maxcpus] Laurent Vivier
2021-09-28 12:11 ` [PATCH v2 2/2] qemu-options: Add missing "sockets=2, maxcpus=2" to CLI "-smp 2" Yanan Wang
2021-09-28 12:28 ` [PATCH v2 2/2] qemu-options: Add missing "sockets=2,maxcpus=2" " Daniel P. Berrangé
2021-09-29 14:38 ` Andrew Jones
2021-09-29 14:55 ` [PATCH v2 2/2] qemu-options: Add missing "sockets=2, maxcpus=2" " Laurent Vivier
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).