Documentation: DT: arm: Add topology property to define package boundaries
RFC PATCH 1/1 Documentation: DT: arm: Add topology property to define package boundaries
The current ARM DT topology description provides the operating system with a topological view of the system that is based on leaf nodes representing either cores or threads (in an SMT system) and a hierarchical set of cluster nodes that creates a hierarchical topology view of how those cores and threads are grouped.
As opposed to the ACPI topology description ([1], PPTT table), this hierarchical representation of clusters does not allow to describe what topology level actually represents the physical package boundary, which is a key piece of information to be used by an operating system to optimize resource allocation and scheduling.
Define an optional, backward compatible boolean property for cluster nodes that, by reusing the ACPI nomenclature, add to the ARM DT topological description a binding to define what cluster level represents a physical package boundary.
[1] http://www.uefi.org/sites/default/files/resources/ACPI_6_2.pdf
--- Documentation/devicetree/bindings/arm/topology.txt | 9 +++++++++ 1 file changed, 9 insertions(+)
Documentation/devicetree/bindings/arm/topology.txt +9 -0
@@ -109,6 +109,15 @@ Bindings for cluster/cpu/thread nodes are defined as follows: The cluster node name must be "clusterN" as described in 2.1 above. A cluster node can not be a leaf node. + Properties for cluster nodes: + + - physical-package + Usage: optional + Value type: <empty> + Definition: if present the cluster node represents the + boundary of a physical package, whether socketed + or surface mounted. + A cluster node's child nodes must be: - one or more cluster nodes; or
Signature · 1 line
2.15.0
RFC PATCH 1/1 Documentation: DT: arm: Add topology property to define package boundaries
Quoted 34 lines · Lorenzo Pieralisi
The current ARM DT topology description provides the operating system with a topological view of the system that is based on leaf nodes representing either cores or threads (in an SMT system) and a hierarchical set of cluster nodes that creates a hierarchical topology view of how those cores and threads are grouped.
As opposed to the ACPI topology description ([1], PPTT table), this hierarchical representation of clusters does not allow to describe what topology level actually represents the physical package boundary, which is a key piece of information to be used by an operating system to optimize resource allocation and scheduling.
Define an optional, backward compatible boolean property for cluster nodes that, by reusing the ACPI nomenclature, add to the ARM DT topological description a binding to define what cluster level represents a physical package boundary.
[1] http://www.uefi.org/sites/default/files/resources/ACPI_6_2.pdf
Signed-off-by Lorenzo Pieralisi <[email protected]>Cc Rob Herring <[email protected]>Cc Sudeep Holla <[email protected]>Cc Jeremy Linton <[email protected]>Cc Morten Rasmussen <[email protected]>Cc Mark Rutland <[email protected]>--- Documentation/devicetree/bindings/arm/topology.txt | 9 +++++++++ 1 file changed, 9 insertions(+)Documentation/devicetree/bindings/arm/topology.txt +0
-0
Documentation/devicetree/bindings/arm/topology.txt Bindings for cluster/cpu/thread nodes are defined as follows: · line 116
Quoted 8 lines
Documentation/devicetree/bindings/arm/topology.txt +5
-0@@ -109,6 +109,15 @@ Bindings for cluster/cpu/thread nodes are defined as follows: The cluster node name must be "clusterN" as described in 2.1 above. A cluster node can not be a leaf node. + Properties for cluster nodes: + + - physical-package + Usage: optional + Value type: <empty>
IIUC, value type must be specified as boolean in this case.
Documentation/devicetree/bindings/arm/topology.txt Bindings for cluster/cpu/thread nodes are defined as follows: · line 123
Quoted 8 lines
Documentation/devicetree/bindings/arm/topology.txt +4
-0+ Definition: if present the cluster node represents the + boundary of a physical package, whether socketed + or surface mounted. + A cluster node's child nodes must be: - one or more cluster nodes; or
Otherwise looks good to me.
Signature · 2 lines
Regards, Sudeep
RFC PATCH 1/1 Documentation: DT: arm: Add topology property to define package boundaries
Quoted 40 lines · Sudeep Holla
Quoted 37 lines · Lorenzo Pieralisi
The current ARM DT topology description provides the operating system with a topological view of the system that is based on leaf nodes representing either cores or threads (in an SMT system) and a hierarchical set of cluster nodes that creates a hierarchical topology view of how those cores and threads are grouped.
As opposed to the ACPI topology description ([1], PPTT table), this hierarchical representation of clusters does not allow to describe what topology level actually represents the physical package boundary, which is a key piece of information to be used by an operating system to optimize resource allocation and scheduling.
Define an optional, backward compatible boolean property for cluster nodes that, by reusing the ACPI nomenclature, add to the ARM DT topological description a binding to define what cluster level represents a physical package boundary.
[1] http://www.uefi.org/sites/default/files/resources/ACPI_6_2.pdf
Signed-off-by Lorenzo Pieralisi <[email protected]>Cc Rob Herring <[email protected]>Cc Sudeep Holla <[email protected]>Cc Jeremy Linton <[email protected]>Cc Morten Rasmussen <[email protected]>Cc Mark Rutland <[email protected]>--- Documentation/devicetree/bindings/arm/topology.txt | 9 +++++++++ 1 file changed, 9 insertions(+)Documentation/devicetree/bindings/arm/topology.txt +0
-0@@ -109,6 +109,15 @@ Bindings for cluster/cpu/thread nodes are defined as follows: The cluster node name must be "clusterN" as described in 2.1 above. A cluster node can not be a leaf node.
Quoted 7 lines
Documentation/devicetree/bindings/arm/topology.txt Bindings for cluster/cpu/thread nodes are defined as follows: · line 116
Quoted 5 lines
Documentation/devicetree/bindings/arm/topology.txt +5
-0+ Properties for cluster nodes: + + - physical-package + Usage: optional + Value type: <empty>IIUC, value type must be specified as boolean in this case.
That's what I thought too but according to DT specs v0.2, table 2.3 the property value type is <empty>.
I do not mind changing it - whatever DT maintainers think is more appropriate.
Thanks,
Lorenzo
RFC PATCH 1/1 Documentation: DT: arm: Add topology property to define package boundaries
In reply to Lorenzo PieralisiHi,
Quoted 40 lines · Lorenzo Pieralisi
The current ARM DT topology description provides the operating system with a topological view of the system that is based on leaf nodes representing either cores or threads (in an SMT system) and a hierarchical set of cluster nodes that creates a hierarchical topology view of how those cores and threads are grouped.
As opposed to the ACPI topology description ([1], PPTT table), this hierarchical representation of clusters does not allow to describe what topology level actually represents the physical package boundary, which is a key piece of information to be used by an operating system to optimize resource allocation and scheduling.
Define an optional, backward compatible boolean property for cluster nodes that, by reusing the ACPI nomenclature, add to the ARM DT topological description a binding to define what cluster level represents a physical package boundary.
[1] http://www.uefi.org/sites/default/files/resources/ACPI_6_2.pdf
Signed-off-by Lorenzo Pieralisi <[email protected]>Cc Rob Herring <[email protected]>Cc Sudeep Holla <[email protected]>Cc Jeremy Linton <[email protected]>Cc Morten Rasmussen <[email protected]>Cc Mark Rutland <[email protected]>--- Documentation/devicetree/bindings/arm/topology.txt | 9 +++++++++ 1 file changed, 9 insertions(+)Documentation/devicetree/bindings/arm/topology.txt +2
-0@@ -109,6 +109,15 @@ Bindings for cluster/cpu/thread nodes are defined as follows: The cluster node name must be "clusterN" as described in 2.1 above. A cluster node can not be a leaf node. + Properties for cluster nodes: +
Documentation/devicetree/bindings/arm/topology.txt Bindings for cluster/cpu/thread nodes are defined as follows: · line 123
Quoted 10 lines
Documentation/devicetree/bindings/arm/topology.txt +7
-0+ - physical-package + Usage: optional + Value type: <empty> + Definition: if present the cluster node represents the + boundary of a physical package, whether socketed + or surface mounted. + A cluster node's child nodes must be: - one or more cluster nodes; or
Looks good so far, but I would worry about it being optional. That seemed like a mistake on the ACPI side.
Assuming it is optional, it might be worth a sentence explaining what the fallback behavior is if the property is missing.
RFC PATCH 1/1 Documentation: DT: arm: Add topology property to define package boundaries
Quoted 47 lines · Jeremy Linton
Hi,
Quoted 44 lines · Lorenzo Pieralisi
The current ARM DT topology description provides the operating system with a topological view of the system that is based on leaf nodes representing either cores or threads (in an SMT system) and a hierarchical set of cluster nodes that creates a hierarchical topology view of how those cores and threads are grouped.
As opposed to the ACPI topology description ([1], PPTT table), this hierarchical representation of clusters does not allow to describe what topology level actually represents the physical package boundary, which is a key piece of information to be used by an operating system to optimize resource allocation and scheduling.
Define an optional, backward compatible boolean property for cluster nodes that, by reusing the ACPI nomenclature, add to the ARM DT topological description a binding to define what cluster level represents a physical package boundary.
[1] http://www.uefi.org/sites/default/files/resources/ACPI_6_2.pdf
Signed-off-by Lorenzo Pieralisi <[email protected]>Cc Rob Herring <[email protected]>Cc Sudeep Holla <[email protected]>Cc Jeremy Linton <[email protected]>Cc Morten Rasmussen <[email protected]>Cc Mark Rutland <[email protected]>---
?Documentation/devicetree/bindings/arm/topology.txt| 9 +++++++++ ? 1 file changed, 9 insertions(+)Documentation/devicetree/bindings/arm/topology.txt +0
-0@@ -109,6 +109,15 @@ Bindings for cluster/cpu/thread nodes are definedas follows:
????? The cluster node name must be "clusterN" as described in 2.1 above. ????? A cluster node can not be a leaf node.
? +??? Properties for cluster nodes:
+
+??? - physical-package
+??????? Usage: optional
+??????? Value type: <empty>
+??????? Definition: if present the cluster node represents the
Quoted 8 lines
Quoted 6 lines
+??????????????? boundary of a physical package, whether socketed +??????????????? or surface mounted.
+
????? A cluster node's child nodes must be:
? ????? - one or more cluster nodes; orLooks good so far, but I would worry about it being optional.
We have no choice, it has to be optional for compatibility reasons as stated in the commit message.
Quoted 1 line
That seemed like a mistake on the ACPI side.
Not necessarily. It's firmware choice as long as it knows how to deal with the default(absence in case of DT)
Quoted 3 lines
Assuming it is optional, it might be worth a sentence explaining what the fallback behavior is if the property is missing.
That would be helpful.
Signature · 2 lines
Regards, Sudeep
RFC PATCH 1/1 Documentation: DT: arm: Add topology property to define package boundaries
In reply to Lorenzo PieralisiQuoted 35 lines · Lorenzo Pieralisi
The current ARM DT topology description provides the operating system with a topological view of the system that is based on leaf nodes representing either cores or threads (in an SMT system) and a hierarchical set of cluster nodes that creates a hierarchical topology view of how those cores and threads are grouped.
As opposed to the ACPI topology description ([1], PPTT table), this hierarchical representation of clusters does not allow to describe what topology level actually represents the physical package boundary, which is a key piece of information to be used by an operating system to optimize resource allocation and scheduling.
Define an optional, backward compatible boolean property for cluster nodes that, by reusing the ACPI nomenclature, add to the ARM DT topological description a binding to define what cluster level represents a physical package boundary.
[1] http://www.uefi.org/sites/default/files/resources/ACPI_6_2.pdf
Signed-off-by Lorenzo Pieralisi <[email protected]>Cc Rob Herring <[email protected]>Cc Sudeep Holla <[email protected]>Cc Jeremy Linton <[email protected]>Cc Morten Rasmussen <[email protected]>Cc Mark Rutland <[email protected]>--- Documentation/devicetree/bindings/arm/topology.txt | 9 +++++++++ 1 file changed, 9 insertions(+)Documentation/devicetree/bindings/arm/topology.txt +0
-0@@ -109,6 +109,15 @@ Bindings for cluster/cpu/thread nodes are defined as follows: The cluster node name must be "clusterN" as described in 2.1 above.
Documentation/devicetree/bindings/arm/topology.txt Bindings for cluster/cpu/thread nodes are defined as follows: · line 119
Quoted 10 lines
Documentation/devicetree/bindings/arm/topology.txt +8
-0A cluster node can not be a leaf node. + Properties for cluster nodes: + + - physical-package + Usage: optional + Value type: <empty> + Definition: if present the cluster node represents the + boundary of a physical package, whether socketed + or surface mounted.
I don't know how to interpret this. Is the node with this property inside or outside the boundary? If I had to guess, I would guess inside. A few extra words to clarify this please.
Quoted 5 lines
Documentation/devicetree/bindings/arm/topology.txt +1
-0+ A cluster node's child nodes must be: - one or more cluster nodes; or
RFC PATCH 1/1 Documentation: DT: arm: Add topology property to define package boundaries
Quoted 38 lines · Frank Rowand
Quoted 37 lines · Lorenzo Pieralisi
The current ARM DT topology description provides the operating system with a topological view of the system that is based on leaf nodes representing either cores or threads (in an SMT system) and a hierarchical set of cluster nodes that creates a hierarchical topology view of how those cores and threads are grouped.
As opposed to the ACPI topology description ([1], PPTT table), this hierarchical representation of clusters does not allow to describe what topology level actually represents the physical package boundary, which is a key piece of information to be used by an operating system to optimize resource allocation and scheduling.
Define an optional, backward compatible boolean property for cluster nodes that, by reusing the ACPI nomenclature, add to the ARM DT topological description a binding to define what cluster level represents a physical package boundary.
[1] http://www.uefi.org/sites/default/files/resources/ACPI_6_2.pdf
Signed-off-by Lorenzo Pieralisi <[email protected]>Cc Rob Herring <[email protected]>Cc Sudeep Holla <[email protected]>Cc Jeremy Linton <[email protected]>Cc Morten Rasmussen <[email protected]>Cc Mark Rutland <[email protected]>--- Documentation/devicetree/bindings/arm/topology.txt | 9 +++++++++ 1 file changed, 9 insertions(+)Documentation/devicetree/bindings/arm/topology.txt +0
-0@@ -109,6 +109,15 @@ Bindings for cluster/cpu/thread nodes are defined as follows: The cluster node name must be "clusterN" as described in 2.1 above. A cluster node can not be a leaf node.
Quoted 12 lines
Documentation/devicetree/bindings/arm/topology.txt Bindings for cluster/cpu/thread nodes are defined as follows: · line 119
Quoted 8 lines
Documentation/devicetree/bindings/arm/topology.txt +8
-0+ Properties for cluster nodes: + + - physical-package + Usage: optional + Value type: <empty> + Definition: if present the cluster node represents the + boundary of a physical package, whether socketed + or surface mounted.I don't know how to interpret this. Is the node with this property inside or outside the boundary? If I had to guess, I would guess inside. A few extra words to clarify this please.
The node is neither inside nor outside, it _is_ the boundary. Every node defines a topology level - the property is there to define which one corresponds to a package, please let me know if it makes things clearer.
Thanks,
Lorenzo
Quoted 6 lines
Quoted 5 lines
Documentation/devicetree/bindings/arm/topology.txt +1
-0+ A cluster node's child nodes must be: - one or more cluster nodes; or
RFC PATCH 1/1 Documentation: DT: arm: Add topology property to define package boundaries
Quoted 52 lines · Lorenzo Pieralisi
Quoted 38 lines · Frank Rowand
Quoted 37 lines · Lorenzo Pieralisi
The current ARM DT topology description provides the operating system with a topological view of the system that is based on leaf nodes representing either cores or threads (in an SMT system) and a hierarchical set of cluster nodes that creates a hierarchical topology view of how those cores and threads are grouped.
As opposed to the ACPI topology description ([1], PPTT table), this hierarchical representation of clusters does not allow to describe what topology level actually represents the physical package boundary, which is a key piece of information to be used by an operating system to optimize resource allocation and scheduling.
Define an optional, backward compatible boolean property for cluster nodes that, by reusing the ACPI nomenclature, add to the ARM DT topological description a binding to define what cluster level represents a physical package boundary.
[1] http://www.uefi.org/sites/default/files/resources/ACPI_6_2.pdf
Signed-off-by Lorenzo Pieralisi <[email protected]>Cc Rob Herring <[email protected]>Cc Sudeep Holla <[email protected]>Cc Jeremy Linton <[email protected]>Cc Morten Rasmussen <[email protected]>Cc Mark Rutland <[email protected]>--- Documentation/devicetree/bindings/arm/topology.txt | 9 +++++++++ 1 file changed, 9 insertions(+)Documentation/devicetree/bindings/arm/topology.txt +0
-0@@ -109,6 +109,15 @@ Bindings for cluster/cpu/thread nodes are defined as follows: The cluster node name must be "clusterN" as described in 2.1 above. A cluster node can not be a leaf node.Quoted 12 lines
Documentation/devicetree/bindings/arm/topology.txt Bindings for cluster/cpu/thread nodes are defined as follows: · line 119
Quoted 8 lines
Documentation/devicetree/bindings/arm/topology.txt +8
-0+ Properties for cluster nodes: + + - physical-package + Usage: optional + Value type: <empty> + Definition: if present the cluster node represents the + boundary of a physical package, whether socketed + or surface mounted.I don't know how to interpret this. Is the node with this property inside or outside the boundary? If I had to guess, I would guess inside. A few extra words to clarify this please.
Quoted 3 lines
The node is neither inside nor outside, it _is_ the boundary. Every node defines a topology level - the property is there to define which one corresponds to a package, please let me know if it makes things clearer.
Not at all clear.
Using Example 1, from section "4 - Example dts" of topology.txt:
cpu-map {
cluster0 {
cluster0 {
core0 {
thread0 {
cpu = <&CPU0>;
};
thread1 {
cpu = <&CPU1>;
};
};
core1 {
thread0 {
cpu = <&CPU2>;
};
thread1 {
cpu = <&CPU3>;
};
};
};
cluster1 {
core0 {
thread0 {
cpu = <&CPU4>;
};
thread1 {
cpu = <&CPU5>;
};
};
core1 {
thread0 {
cpu = <&CPU6>;
};
thread1 {
cpu = <&CPU7>;
};
};
};
};Pretend that cpu-map/cluster0/cluster0 is a physical package that contains two cores, and cpu-map/cluster0/cluster1 is another physical package that contains two cores. My guess as to how to use the property "physical-package" would be to place it in nodes cpu-map/cluster0/cluster0 and cpu-map/cluster0/cluster1. In that case, those two nodes are on the "inside" of two different packages.
The alternate way to use the property "physical-package" would be to place it in node cpu-map/cluster0. In this case, the node is "outside" of the packages.
Again, I suspect that the intended use is the first of my two examples, but the proposed binding wording does not make that clear to me. My use of "inside" and "outside" may not be the proper words or concept, but the binding somehow needs to say which of my two above example locations is the correct place to use the "physical-package" property.
-Frank
Quoted 12 lines
Thanks,
LorenzoQuoted 6 lines
Documentation/devicetree/bindings/arm/topology.txt Bindings for cluster/cpu/thread nodes are defined as follows: · line 123
Quoted 5 lines
Documentation/devicetree/bindings/arm/topology.txt +1
-0+ A cluster node's child nodes must be: - one or more cluster nodes; or.
RFC PATCH 1/1 Documentation: DT: arm: Add topology property to define package boundaries
Quoted 117 lines · Frank Rowand
Quoted 52 lines · Lorenzo Pieralisi
Quoted 38 lines · Frank Rowand
Quoted 37 lines · Lorenzo Pieralisi
The current ARM DT topology description provides the operating system with a topological view of the system that is based on leaf nodes representing either cores or threads (in an SMT system) and a hierarchical set of cluster nodes that creates a hierarchical topology view of how those cores and threads are grouped.
As opposed to the ACPI topology description ([1], PPTT table), this hierarchical representation of clusters does not allow to describe what topology level actually represents the physical package boundary, which is a key piece of information to be used by an operating system to optimize resource allocation and scheduling.
Define an optional, backward compatible boolean property for cluster nodes that, by reusing the ACPI nomenclature, add to the ARM DT topological description a binding to define what cluster level represents a physical package boundary.
[1] http://www.uefi.org/sites/default/files/resources/ACPI_6_2.pdf
Signed-off-by Lorenzo Pieralisi <[email protected]>Cc Rob Herring <[email protected]>Cc Sudeep Holla <[email protected]>Cc Jeremy Linton <[email protected]>Cc Morten Rasmussen <[email protected]>Cc Mark Rutland <[email protected]>--- Documentation/devicetree/bindings/arm/topology.txt | 9 +++++++++ 1 file changed, 9 insertions(+)Documentation/devicetree/bindings/arm/topology.txt +0
-0@@ -109,6 +109,15 @@ Bindings for cluster/cpu/thread nodes are defined as follows: The cluster node name must be "clusterN" as described in 2.1 above. A cluster node can not be a leaf node.Quoted 12 lines
Documentation/devicetree/bindings/arm/topology.txt Bindings for cluster/cpu/thread nodes are defined as follows: · line 119
Quoted 8 lines
Documentation/devicetree/bindings/arm/topology.txt +8
-0+ Properties for cluster nodes: + + - physical-package + Usage: optional + Value type: <empty> + Definition: if present the cluster node represents the + boundary of a physical package, whether socketed + or surface mounted.I don't know how to interpret this. Is the node with this property inside or outside the boundary? If I had to guess, I would guess inside. A few extra words to clarify this please.
Quoted 3 lines
The node is neither inside nor outside, it _is_ the boundary. Every node defines a topology level - the property is there to define which one corresponds to a package, please let me know if it makes things clearer.
Not at all clear.
Using Example 1, from section "4 - Example dts" of topology.txt:
cpu-map { cluster0 { cluster0 { core0 { thread0 { cpu = <&CPU0>; }; thread1 { cpu = <&CPU1>; }; }; core1 { thread0 { cpu = <&CPU2>; }; thread1 { cpu = <&CPU3>; }; }; }; cluster1 { core0 { thread0 { cpu = <&CPU4>; }; thread1 { cpu = <&CPU5>; }; }; core1 { thread0 { cpu = <&CPU6>; }; thread1 { cpu = <&CPU7>; }; }; }; };Pretend that cpu-map/cluster0/cluster0 is a physical package that contains two cores, and cpu-map/cluster0/cluster1 is another physical package that contains two cores. My guess as to how to use the property "physical-package" would be to place it in nodes cpu-map/cluster0/cluster0 and cpu-map/cluster0/cluster1. In that case, those two nodes are on the "inside" of two different packages.
The alternate way to use the property "physical-package" would be to place it in node cpu-map/cluster0. In this case, the node is "outside" of the packages.
Quoted 6 lines
Again, I suspect that the intended use is the first of my two examples, but the proposed binding wording does not make that clear to me. My use of "inside" and "outside" may not be the proper words or concept, but the binding somehow needs to say which of my two above example locations is the correct place to use the "physical-package" property.
Ok, I see, I will update the description accordingly to make it clearer.
Thank you,
Lorenzo