From patchwork Fri Aug 14 17:34:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring \(Arm\)" X-Patchwork-Id: 247738 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp554141ilo; Fri, 14 Aug 2020 10:34:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzm0xjtEXnBub+5MazgYbmVsdm6stUe2Q54KWomOV8IOEuACJfZOEspXDB1rksAJ1ghnErT X-Received: by 2002:a05:6402:1545:: with SMTP id p5mr3191664edx.388.1597426467308; Fri, 14 Aug 2020 10:34:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597426467; cv=none; d=google.com; s=arc-20160816; b=pd8NubXoysfyMG29n3IdCLYkoLLQCYDuHDN2Pl3A4ZkIRIyZGU75CC6U2u4/M6NSgx rgRbAFNlQcAwvTzbyEh8rl+SUp1WAbNw+K5dJLcnt2Tb3JfMVz1PqEm/y8FtSEmNRnRZ PawooiE2Kyys/Bh/dIUJHLh33UMqdvhOfeD5h3wnvlcPXXElwH6/yo/K7iO96KF5VxqO IwHb97bij/VQ1kz17V21YkT1qgfih1FpCwQP7g8XTmnaYgyZmc/vt+CRG9mojN+CTnzn 8wG5mNhOeaPDmI/twmkPSY8bFYcH1ZjxV8vqOYbCoMZLOFKlOCEp/sXQE0wQHCTntFXw BcCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=HRLUQXT1FjeDUoDxrxVid7a8LubFJ4oZ02ezybrYxg4=; b=Y1AFTatxd5AzUnK3Pr7hD7uPdBgQD55l7MrwUk/GSRM8qZgI/H6uHr8C9wY03Hww7S 8BhXg6KNE2iYtkJ09hILDTrODAxev2MUHJpPOyoOZ9rzrn2w212FQYIptoTNl9CeRksX 0vUCeLGPwIcTgJp2s4xm14rgJlCUw58/4JramGjYkj3IdIRV271jeaqrpTGm2FDfY9Wo MrfLZW8mbqviHZP3zgR7NjJnYLaeQu5zy01QJMLCW4MA/kF/G68Ri/hxkA8uFDDv1kB8 pu4loJbvqM9bkrcSzPlZ57ApW8CEmBw1Np/O/U6cCItEAozVua3DT1CDcrltZQUOgzKb 40Jg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b10si5714877eje.310.2020.08.14.10.34.27; Fri, 14 Aug 2020 10:34:27 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728761AbgHNReW (ORCPT + 6 others); Fri, 14 Aug 2020 13:34:22 -0400 Received: from mail-io1-f48.google.com ([209.85.166.48]:41607 "EHLO mail-io1-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726241AbgHNReU (ORCPT ); Fri, 14 Aug 2020 13:34:20 -0400 Received: by mail-io1-f48.google.com with SMTP id g19so11509153ioh.8; Fri, 14 Aug 2020 10:34:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=HRLUQXT1FjeDUoDxrxVid7a8LubFJ4oZ02ezybrYxg4=; b=dG/QbddHpusCjE7yQUPHaFYljR7NxS4gPwgJ/jXFDmlsq0VfyERxNrXL+a3hwY/8jo 3uaIDnB2XsrqvYLPlnt4oDKJsyqr9Rfu2RZmZixvIeRf40WdCCxBUWk3fs//jmeZkDfx 06tfsrOsF5rRpZDtMUig9ejyCn/Mlhsv7b2QhGLSmXVbDqTKrSdVqaYN+AVvB5MP9Njn +pZ6SMsuih2LLCFNn614XVCJ6969q974BazSpIurAsrCkydc1WpUSt0K6yoXKf0FOZSW skjALzH03VOhjC96IlDDT+pAzvWzOuEf+GG5uQU7kPFTTJqIm4lS/HjxRYAdD2Y5Q2eM wbhQ== X-Gm-Message-State: AOAM532qPYlBgtfHViNSO8q+GF9swneYJSIcVlJcJB3xKLfHczhve2Ca Uss/BJwVZWEXoyqilFx/ax/EyMb1zw== X-Received: by 2002:a02:852c:: with SMTP id g41mr3723855jai.58.1597426459238; Fri, 14 Aug 2020 10:34:19 -0700 (PDT) Received: from xps15.herring.priv ([64.188.179.249]) by smtp.googlemail.com with ESMTPSA id x185sm4637575iof.41.2020.08.14.10.34.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Aug 2020 10:34:18 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Andrei Ziureaev , Masahiro Yamada Subject: [PATCH 0/3] DT validation time improvements Date: Fri, 14 Aug 2020 11:34:14 -0600 Message-Id: <20200814173417.2322509-1-robh@kernel.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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(-) -- 2.25.1