qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] qapi/machine: Fix missing @modules in topology ordering
@ 2025-10-13  7:45 Zhao Liu
  2025-10-13  8:06 ` Daniel P. Berrangé
  2025-10-15  6:21 ` Markus Armbruster
  0 siblings, 2 replies; 4+ messages in thread
From: Zhao Liu @ 2025-10-13  7:45 UTC (permalink / raw)
  To: Markus Armbruster, Eric Blake, Eduardo Habkost, Marcel Apfelbaum,
	Philippe Mathieu-DaudÃ, Yanan Wang
  Cc: qemu-devel, Zhao Liu

The module level is between core and cluster levels. Fix the QAPI
documentation to add the module level in topology ordering.

Reported-by: Markus Armbruster <armbru@redhat.com>
Fixes: 8ec0a4634798 ("hw/core/machine: Support modules in -smp")
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
---
 qapi/machine.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qapi/machine.json b/qapi/machine.json
index 038eab281c78..5e268479e546 100644
--- a/qapi/machine.json
+++ b/qapi/machine.json
@@ -1624,7 +1624,7 @@
 # containers.
 #
 # The ordering from highest/coarsest to lowest/finest is: @drawers,
-# @books, @sockets, @dies, @clusters, @cores, @threads.
+# @books, @sockets, @dies, @clusters, @modules, @cores, @threads.
 #
 # Different architectures support different subsets of topology
 # containers.
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] qapi/machine: Fix missing @modules in topology ordering
  2025-10-13  7:45 [PATCH] qapi/machine: Fix missing @modules in topology ordering Zhao Liu
@ 2025-10-13  8:06 ` Daniel P. Berrangé
  2025-10-15  6:21 ` Markus Armbruster
  1 sibling, 0 replies; 4+ messages in thread
From: Daniel P. Berrangé @ 2025-10-13  8:06 UTC (permalink / raw)
  To: Zhao Liu
  Cc: Markus Armbruster, Eric Blake, Eduardo Habkost, Marcel Apfelbaum,
	Philippe Mathieu-DaudÃ, Yanan Wang, qemu-devel

On Mon, Oct 13, 2025 at 03:45:11PM +0800, Zhao Liu wrote:
> The module level is between core and cluster levels. Fix the QAPI
> documentation to add the module level in topology ordering.
> 
> Reported-by: Markus Armbruster <armbru@redhat.com>
> Fixes: 8ec0a4634798 ("hw/core/machine: Support modules in -smp")
> Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
> ---
>  qapi/machine.json | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/qapi/machine.json b/qapi/machine.json
> index 038eab281c78..5e268479e546 100644
> --- a/qapi/machine.json
> +++ b/qapi/machine.json
> @@ -1624,7 +1624,7 @@
>  # containers.
>  #
>  # The ordering from highest/coarsest to lowest/finest is: @drawers,
> -# @books, @sockets, @dies, @clusters, @cores, @threads.
> +# @books, @sockets, @dies, @clusters, @modules, @cores, @threads.
>  #
>  # Different architectures support different subsets of topology
>  # containers.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>

With 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] 4+ messages in thread

* Re: [PATCH] qapi/machine: Fix missing @modules in topology ordering
  2025-10-13  7:45 [PATCH] qapi/machine: Fix missing @modules in topology ordering Zhao Liu
  2025-10-13  8:06 ` Daniel P. Berrangé
@ 2025-10-15  6:21 ` Markus Armbruster
  2025-10-20  5:58   ` Zhao Liu
  1 sibling, 1 reply; 4+ messages in thread
From: Markus Armbruster @ 2025-10-15  6:21 UTC (permalink / raw)
  To: Zhao Liu
  Cc: Eric Blake, Eduardo Habkost, Marcel Apfelbaum,
	Philippe Mathieu-DaudÃ, Yanan Wang, qemu-devel

Zhao Liu <zhao1.liu@intel.com> writes:

> The module level is between core and cluster levels. Fix the QAPI
> documentation to add the module level in topology ordering.
>
> Reported-by: Markus Armbruster <armbru@redhat.com>
> Fixes: 8ec0a4634798 ("hw/core/machine: Support modules in -smp")
> Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
> ---
>  qapi/machine.json | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/qapi/machine.json b/qapi/machine.json
> index 038eab281c78..5e268479e546 100644
> --- a/qapi/machine.json
> +++ b/qapi/machine.json
> @@ -1624,7 +1624,7 @@
>  # containers.
>  #
>  # The ordering from highest/coarsest to lowest/finest is: @drawers,
> -# @books, @sockets, @dies, @clusters, @cores, @threads.
> +# @books, @sockets, @dies, @clusters, @modules, @cores, @threads.
>  #
>  # Different architectures support different subsets of topology
>  # containers.

Acked-by: Markus Armbruster <armbru@redhat.com>

However, there are more mentions of @drawers etc. in comments and
documentation elsewhere.  Quick grep for "drawers" there appended.
Please double-check for missing mentions of modules.


docs/about/deprecated.rst:configurations (e.g. -smp drawers=1,books=1,clusters=1 for x86 PC machine) is
docs/devel/s390-cpu-topology.rst:    -smp 1,drawers=3,books=3,sockets=2,cores=2,maxcpus=36 \
docs/system/s390x/cpu-topology.rst:topology containers: drawers, books and sockets. They define a
docs/system/s390x/cpu-topology.rst:If none of the containers attributes (drawers, books, sockets) are
hw/s390x/cpu-topology.c: * (0, 0, 0) up to the last (smp->drawers, smp->books, smp->sockets).
include/hw/boards.h: * @drawers_supported - whether drawers are supported by the machine
include/hw/boards.h: * @drawers: the number of drawers on the machine
tests/functional/s390x/test_topology.py:    the cores, sockets, books and drawers and 2 modifiers attributes,
tests/unit/test-smp-parse.c: *  -drawers/books/sockets/cores/threads
tests/unit/test-smp-parse.c: *  -drawers/books/sockets/dies/clusters/modules/cores/threads
tests/unit/test-smp-parse.c:         *   -smp 8,drawers=1,books=1,sockets=2,dies=1,clusters=1,modules=1,\
tests/unit/test-smp-parse.c:        /* config: -smp 2,drawers=2 */
tests/unit/test-smp-parse.c:        /* config: -smp 16,drawers=2,sockets=2,cores=4,threads=2,maxcpus=16 */
tests/unit/test-smp-parse.c:        /* config: -smp 34,drawers=2,sockets=2,cores=4,threads=2,maxcpus=32 */
tests/unit/test-smp-parse.c:         * config: -smp 200,drawers=3,books=5,sockets=2,cores=4,\
tests/unit/test-smp-parse.c:         * config: -smp 242,drawers=3,books=5,sockets=2,cores=4,\
tests/unit/test-smp-parse.c:         * config: -smp 200,drawers=3,books=5,sockets=2,dies=4,\
tests/unit/test-smp-parse.c:         * config: -smp 2881,drawers=3,books=5,sockets=2,dies=4,\
tests/unit/test-smp-parse.c:         * config: -smp 1,drawers=3,books=5,sockets=2,dies=4,\
tests/unit/test-smp-parse.c:         * config: -smp 0,drawers=1,books=1,sockets=1,dies=1,\
tests/unit/test-smp-parse.c:         * Test "drawers=0".
tests/unit/test-smp-parse.c:         * config: -smp 1,drawers=0,books=1,sockets=1,dies=1,\
tests/unit/test-smp-parse.c:         * config: -smp 1,drawers=1,books=0,sockets=1,dies=1,\
tests/unit/test-smp-parse.c:         * config: -smp 1,drawers=1,books=1,sockets=0,dies=1,\
tests/unit/test-smp-parse.c:         * config: -smp 1,drawers=1,books=1,sockets=1,dies=0,\
tests/unit/test-smp-parse.c:         * config: -smp 1,drawers=1,books=1,sockets=1,dies=1,\
tests/unit/test-smp-parse.c:         * config: -smp 1,drawers=1,books=1,sockets=1,dies=1,\
tests/unit/test-smp-parse.c:         * config: -smp 1,drawers=1,books=1,sockets=1,dies=1,\
tests/unit/test-smp-parse.c:         * config: -smp 1,drawers=1,books=1,sockets=1,dies=1,\
tests/unit/test-smp-parse.c:         * config: -smp 1,drawers=1,books=1,sockets=1,dies=1,\
tests/unit/test-smp-parse.c:        /* when drawers parameter is omitted, it will be set as 1 */
tests/unit/test-smp-parse.c:        /* when drawers parameter is specified */
tests/unit/test-smp-parse.c:         * when drawers and books parameters are omitted, they will
tests/unit/test-smp-parse.c:        /* when drawers and books parameters are both specified */
tests/unit/test-smp-parse.c:         * when drawers, books, dies, clusters and modules parameters are
tests/unit/test-smp-parse.c:         * when drawers, books, dies, clusters and modules parameters



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] qapi/machine: Fix missing @modules in topology ordering
  2025-10-15  6:21 ` Markus Armbruster
@ 2025-10-20  5:58   ` Zhao Liu
  0 siblings, 0 replies; 4+ messages in thread
From: Zhao Liu @ 2025-10-20  5:58 UTC (permalink / raw)
  To: Markus Armbruster
  Cc: Eric Blake, Eduardo Habkost, Marcel Apfelbaum,
	Philippe Mathieu-DaudÃ, Yanan Wang, qemu-devel

On Wed, Oct 15, 2025 at 08:21:38AM +0200, Markus Armbruster wrote:
> Date: Wed, 15 Oct 2025 08:21:38 +0200
> From: Markus Armbruster <armbru@redhat.com>
> Subject: Re: [PATCH] qapi/machine: Fix missing @modules in topology ordering
> 
> Zhao Liu <zhao1.liu@intel.com> writes:
> 
> > The module level is between core and cluster levels. Fix the QAPI
> > documentation to add the module level in topology ordering.
> >
> > Reported-by: Markus Armbruster <armbru@redhat.com>
> > Fixes: 8ec0a4634798 ("hw/core/machine: Support modules in -smp")
> > Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
> > ---
> >  qapi/machine.json | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/qapi/machine.json b/qapi/machine.json
> > index 038eab281c78..5e268479e546 100644
> > --- a/qapi/machine.json
> > +++ b/qapi/machine.json
> > @@ -1624,7 +1624,7 @@
> >  # containers.
> >  #
> >  # The ordering from highest/coarsest to lowest/finest is: @drawers,
> > -# @books, @sockets, @dies, @clusters, @cores, @threads.
> > +# @books, @sockets, @dies, @clusters, @modules, @cores, @threads.
> >  #
> >  # Different architectures support different subsets of topology
> >  # containers.
> 
> Acked-by: Markus Armbruster <armbru@redhat.com>

Thanks!

> However, there are more mentions of @drawers etc. in comments and
> documentation elsewhere.  Quick grep for "drawers" there appended.
> Please double-check for missing mentions of modules.
> 
> 
> docs/about/deprecated.rst:configurations (e.g. -smp drawers=1,books=1,clusters=1 for x86 PC machine) is

This case should be cleaned up since I rememberred the realted change is
reverted. I will check in details and submit a patch if necessary.

> docs/devel/s390-cpu-topology.rst:    -smp 1,drawers=3,books=3,sockets=2,cores=2,maxcpus=36 \
> docs/system/s390x/cpu-topology.rst:topology containers: drawers, books and sockets. They define a
> docs/system/s390x/cpu-topology.rst:If none of the containers attributes (drawers, books, sockets) are
> hw/s390x/cpu-topology.c: * (0, 0, 0) up to the last (smp->drawers, smp->books, smp->sockets).

s390x doesn't support module level, so its doc is fine.

> include/hw/boards.h: * @drawers_supported - whether drawers are supported by the machine
> include/hw/boards.h: * @drawers: the number of drawers on the machine

general machine codes has considerred module level.

> tests/functional/s390x/test_topology.py:    the cores, sockets, books and drawers and 2 modifiers attributes,

s390x doesn't support module level.

> tests/unit/test-smp-parse.c: *  -drawers/books/sockets/cores/threads
> tests/unit/test-smp-parse.c: *  -drawers/books/sockets/dies/clusters/modules/cores/threads
> tests/unit/test-smp-parse.c:         *   -smp 8,drawers=1,books=1,sockets=2,dies=1,clusters=1,modules=1,\
> tests/unit/test-smp-parse.c:        /* config: -smp 2,drawers=2 */
> tests/unit/test-smp-parse.c:        /* config: -smp 16,drawers=2,sockets=2,cores=4,threads=2,maxcpus=16 */
> tests/unit/test-smp-parse.c:        /* config: -smp 34,drawers=2,sockets=2,cores=4,threads=2,maxcpus=32 */
> tests/unit/test-smp-parse.c:         * config: -smp 200,drawers=3,books=5,sockets=2,cores=4,\
> tests/unit/test-smp-parse.c:         * config: -smp 242,drawers=3,books=5,sockets=2,cores=4,\
> tests/unit/test-smp-parse.c:         * config: -smp 200,drawers=3,books=5,sockets=2,dies=4,\
> tests/unit/test-smp-parse.c:         * config: -smp 2881,drawers=3,books=5,sockets=2,dies=4,\
> tests/unit/test-smp-parse.c:         * config: -smp 1,drawers=3,books=5,sockets=2,dies=4,\
> tests/unit/test-smp-parse.c:         * config: -smp 0,drawers=1,books=1,sockets=1,dies=1,\
> tests/unit/test-smp-parse.c:         * Test "drawers=0".
> tests/unit/test-smp-parse.c:         * config: -smp 1,drawers=0,books=1,sockets=1,dies=1,\
> tests/unit/test-smp-parse.c:         * config: -smp 1,drawers=1,books=0,sockets=1,dies=1,\
> tests/unit/test-smp-parse.c:         * config: -smp 1,drawers=1,books=1,sockets=0,dies=1,\
> tests/unit/test-smp-parse.c:         * config: -smp 1,drawers=1,books=1,sockets=1,dies=0,\
> tests/unit/test-smp-parse.c:         * config: -smp 1,drawers=1,books=1,sockets=1,dies=1,\
> tests/unit/test-smp-parse.c:         * config: -smp 1,drawers=1,books=1,sockets=1,dies=1,\
> tests/unit/test-smp-parse.c:         * config: -smp 1,drawers=1,books=1,sockets=1,dies=1,\
> tests/unit/test-smp-parse.c:         * config: -smp 1,drawers=1,books=1,sockets=1,dies=1,\
> tests/unit/test-smp-parse.c:         * config: -smp 1,drawers=1,books=1,sockets=1,dies=1,\
> tests/unit/test-smp-parse.c:        /* when drawers parameter is omitted, it will be set as 1 */
> tests/unit/test-smp-parse.c:        /* when drawers parameter is specified */
> tests/unit/test-smp-parse.c:         * when drawers and books parameters are omitted, they will
> tests/unit/test-smp-parse.c:        /* when drawers and books parameters are both specified */
> tests/unit/test-smp-parse.c:         * when drawers, books, dies, clusters and modules parameters are
> tests/unit/test-smp-parse.c:         * when drawers, books, dies, clusters and modules parameters

test-smp-parse has coverred module case, so it's fine too. But test-smp-parse
doesn't cover smp-cache. I'll consider to add the new test case.

Thanks very much!

Regards,
Zhao




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-10-20  5:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-13  7:45 [PATCH] qapi/machine: Fix missing @modules in topology ordering Zhao Liu
2025-10-13  8:06 ` Daniel P. Berrangé
2025-10-15  6:21 ` Markus Armbruster
2025-10-20  5:58   ` Zhao Liu

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).