Skip to content

DT validation time improvements

Rob Herring linux-devicetree lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3dt-bindings: Bump minimum version of dtschema to 2020.8Documentation/devicetree/bindings/Makefile+1 -10 replies
2/3dt-bindings: Use json for processed-schema*Documentation/devicetree/bindings/.gitignore Documentation/devicetree/bindings/Makefile scripts/Makefile.lib+15 -130 replies
3/3dt-bindings: Validate DT binding schema in a single callDocumentation/devicetree/bindings/Makefile+15 -70 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] DT validation time improvements

The time to run dt_binding_check and dtbs_check has gotten significantly slower as the number of schemas has increased. There's 2 main factors causing validation time on each file to be slow.

The first is python start-up time. This is a common problem for python without much of a solution other than minimizing module imports. Eliminating some imports was possible for dt-extract-example, but not the other tools. Validating multiple files in a single call is the simplest solution. The downside of processing multiple files in one call is losing make dependency handling. This is not too important for dt-doc-validate as the validation time is <10 sec.

The 2nd factor is processed-schema*.yaml is now ~2MB and around 2 sec to parse (which is done for every .dts and example). Switching processed-schema*.yaml to JSON is much faster to parse

The overall result of these changes is a 2x improvement to dtbs_check and a 4-5x improvement to dt_binding_check.

Rob

Andrei Ziureaev (1):
dt-bindings: Use json for processed-schema*

Rob Herring (2):
dt-bindings: Bump minimum version of dtschema to 2020.8
dt-bindings: Validate DT binding schema in a single call

 Documentation/devicetree/bindings/.gitignore |  1 +
 Documentation/devicetree/bindings/Makefile   | 45 ++++++++++++--------
 scripts/Makefile.lib                         |  2 +-
 3 files changed, 29 insertions(+), 19 deletions(-)
Signature · 1 line
2.25.1