qemu-options: Trivial doc fixes related to -smp
v2 cover qemu-options: Trivial doc fixes related to -smp
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
PATCH v2 1/2 qemu-options: Tweak [, maxcpus=cpus] to [, maxcpus=maxcpus]
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.
--- qemu-options.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
qemu-options.hx +1 -1
@@ -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"
Signature · 1 line
2.19.1
Re: [PATCH v2 1/2] qemu-options: Tweak [,maxcpus=cpus] to [,maxcpus=maxcpus]
Quoted 9 lines · Yanan Wang
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 <[email protected]>Reviewed-by Damien Hedde <[email protected]>--- qemu-options.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Regards,
Daniel
Signature · 3 lines
|: 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: [PATCH v2 1/2] qemu-options: Tweak [,maxcpus=cpus] to [,maxcpus=maxcpus]
In reply to Yanan WangQuoted 26 lines · Yanan Wang
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 <[email protected]>Reviewed-by Damien Hedde <[email protected]>--- qemu-options.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)qemu-options.hx +1
-1@@ -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"Signature · 1 line
2.19.1
Laurent Vivier
AppliedRe: [PATCH v2 1/2] qemu-options: Tweak [, maxcpus=cpus] to [, maxcpus=maxcpus]
In reply to Yanan WangLe 28/09/2021 à 14:11, Yanan Wang a écrit :
Quoted 16 lines
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 <[email protected]>Reviewed-by Damien Hedde <[email protected]>--- qemu-options.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)qemu-options.hx +0
-0
qemu-options.hx SRST · line 206
Quoted 8 lines
qemu-options.hx +1
-1@@ -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
PATCH v2 2/2 qemu-options: Add missing "sockets=2, maxcpus=2" to CLI "-smp 2"
In reply to Yanan WangThere 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.
--- qemu-options.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
qemu-options.hx +1 -1
@@ -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 \
Signature · 1 line
2.19.1
Re: [PATCH v2 2/2] qemu-options: Add missing "sockets=2,maxcpus=2" to CLI "-smp 2"
Quoted 7 lines · Yanan Wang
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.
Quoted 8 lines
So "-smp 2,sockets=2,maxcpus=2" will be optimal when we expect multiple sockets and 2 cpus totally.
Signed-off-by Yanan Wang <[email protected]>Reviewed-by Philippe Mathieu-Daude <[email protected]>--- qemu-options.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Regards,
Daniel
Signature · 3 lines
|: 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: [PATCH v2 2/2] qemu-options: Add missing "sockets=2,maxcpus=2" to CLI "-smp 2"
In reply to Yanan WangQuoted 32 lines · Yanan Wang
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 <[email protected]>Reviewed-by Philippe Mathieu-Daude <[email protected]>--- qemu-options.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)qemu-options.hx +1
-1@@ -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 \Signature · 1 line
2.19.1
Laurent Vivier
AppliedRe: [PATCH v2 2/2] qemu-options: Add missing "sockets=2, maxcpus=2" to CLI "-smp 2"
In reply to Yanan WangLe 28/09/2021 à 14:11, Yanan Wang a écrit :
Quoted 22 lines
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 <[email protected]>Reviewed-by Philippe Mathieu-Daude <[email protected]>--- qemu-options.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)qemu-options.hx +0
-0
qemu-options.hx SRST · line 401
Quoted 8 lines
qemu-options.hx +1
-1@@ -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