qemu-options: Trivial doc fixes related to -smp
cover qemu-options: Trivial doc fixes related to -smp
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(-)
Signature · 1 line
2.19.1
PATCH 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 1/2] qemu-options: Tweak [, maxcpus=cpus] to [, maxcpus=maxcpus]
Quoted 6 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]>---
Quoted 17 lines
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"
PATCH 2/2 qemu-options: Add missing "sockets=2" to CLI "-smp 2"
In reply to Yanan WangThere 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.
--- 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 2/2] qemu-options: Add missing "sockets=2" to CLI "-smp 2"
Quoted 16 lines · Yanan Wang
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 <[email protected]>--- qemu-options.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)qemu-options.hx +0
-0
qemu-options.hx SRST · line 398
Quoted 5 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 \
Is the addition of "maxcpus=2" intentional?
Quoted 4 lines
qemu-options.hx +0
-0-numa node,nodeid=0,memdev=m0 \ -numa node,nodeid=1,memdev=m1,initiator=0 \ -numa cpu,node-id=0,socket-id=0 \
Re: [PATCH 2/2] qemu-options: Add missing "sockets=2" to CLI "-smp 2"
Quoted 12 lines · Philippe Mathieu-Daudé
Quoted 11 lines · Yanan Wang
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 <[email protected]>--- qemu-options.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 11 lines
qemu-options.hx SRST · line 398
Quoted 10 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 \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
Quoted 5 lines
qemu-options.hx SRST · line 401
Quoted 4 lines
qemu-options.hx +0
-0-numa node,nodeid=0,memdev=m0 \ -numa node,nodeid=1,memdev=m1,initiator=0 \ -numa cpu,node-id=0,socket-id=0 \.
Re: [PATCH 2/2] qemu-options: Add missing "sockets=2" to CLI "-smp 2"
Quoted 25 lines · wangyanan (Y)
Quoted 12 lines · Philippe Mathieu-Daudé
Quoted 11 lines · Yanan Wang
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 <[email protected]>--- qemu-options.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Quoted 11 lines
qemu-options.hx SRST · line 398
Quoted 10 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 \Is the addition of "maxcpus=2" intentional?
Quoted 2 lines
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
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 2/2] qemu-options: Add missing "sockets=2" to CLI "-smp 2"
Quoted 25 lines · Daniel P. Berrangé
Quoted 24 lines · wangyanan (Y)
Quoted 23 lines · Philippe Mathieu-Daudé
Quoted 16 lines · Yanan Wang
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 <[email protected]>--- qemu-options.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)qemu-options.hx +0
-0qemu-options.hx SRST · line 398
Quoted 5 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 \Is the addition of "maxcpus=2" intentional?
Quoted 4 lines
Quoted 2 lines
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
Philippe Mathieu-Daudé
Reviewed-byRe: [PATCH 2/2] qemu-options: Add missing "sockets=2" to CLI "-smp 2"
Quoted 29 lines · wangyanan (Y)
Quoted 27 lines · Daniel P. Berrangé
Quoted 26 lines · wangyanan (Y)
Quoted 12 lines · Philippe Mathieu-Daudé
Quoted 11 lines · Yanan Wang
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 <[email protected]>---
qemu-options.hx | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)Quoted 11 lines
qemu-options.hx SRST · line 398
Quoted 10 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 \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 ?
Quoted 7 lines
Quoted 2 lines
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: