Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 70F9EC433EF for ; Tue, 12 Jul 2022 17:41:45 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 33E5B84195; Tue, 12 Jul 2022 19:41:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1657647703; bh=cSzSpPfG+pU07wpmepH9MS1YgHA9+GAiQh+IOjYbF8A=; h=From:To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=LqD3TO993ktDVT4IFgapPSCEdX7h7gpH8r5Q8gP5zXvs9MxmpnUL85thiSjWpr70/ 4ARSXNi5L5Hspf1kKhCdSEiwj9FAAKms6VQVl8LH6/KAbAqe7lhH9DVXSEFKoMzgfg N/ayjYewy9jdRYWczSDpR1dohPk5vIxS2LLjcU1vnlchnE0wK5KGmAOd80Bzhr7l+h MEO1/mWZD+U9RDQJT2tN7V1Dm3bdbNaUXShsxVQnYhNPZzQbB+iC7GVcLip0ywp7sr USmbAZqdRnEscFg76nIS5P0/TkA8DfZ099Ejpn8rVDLTaLxQnSP87LMFexKDWKQnr7 p/dLUclMO32qw== Received: from tr.lan (ip-86-49-12-201.bb.vodafone.cz [86.49.12.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id D78208414E; Tue, 12 Jul 2022 19:41:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1657647701; bh=cSzSpPfG+pU07wpmepH9MS1YgHA9+GAiQh+IOjYbF8A=; h=From:To:Cc:Subject:Date:From; b=GMpppH1DWHhpUGJYcr4iWUDZ8Q4YVLbCRI45bIf7HFv6Obc1ssTPzQDoajWTfq1S1 2Z5XvZm9RWaFcPzJU+RG7yxCLbIQfat4PMpAHPR2Ps70/g46UTqlt8wEf3RQQf40Nt OCS0iUV8SKrhalUIwwgkAefAAdyKVtM3i3B0DE1UdER8IGagBNNfXpj7JfSOwvS89/ gML4V2Rb57JLbb0GGaUak21Q00lZouJKmtz2UmDAGaoqdf5eBN3SgEyYsYE3xko2BY rUhyWPviLX3hquFeDE7LuVk5iyALAh1m/0z+/LoDFL2/mBYhItBGfvDYDBDwG+kpt2 5hlBVcW+t/0xA== From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut , Alper Nebi Yasak , Simon Glass Subject: [PATCH] binman: Increase default fitImage data section resize step from 1k to 64k Date: Tue, 12 Jul 2022 19:41:29 +0200 Message-Id: <20220712174129.162743-1-marex@denx.de> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Currently the fitImage data area is resized in 1 kiB steps. This works when bundling smaller images below some 1 MiB, but when bundling large images into the fitImage, this make binman spend extreme amount of time and CPU just spinning in pylibfdt FdtSw.check_space() until the size grows enough for the large image to fit into the data area. Increase the default step to 64 kiB, which is a reasonable compromise -- the U-Boot blobs are somewhere in the 64kiB...1MiB range, DT blob are just short of 64 kiB, and so are the other blobs. This reduces binman runtime with 32 MiB blob from 2.3 minutes to 5 seconds. The following can be used to trigger the problem if rand.bin is some 32 MiB. " / { itb { fit { images { test { compression = "none"; description = "none"; type = "flat_dt"; blob { filename = "rand.bin"; type = "blob-ext"; }; }; }; }; }; configurations { binman_configuration: config { loadables = "test"; }; }; }; " Signed-off-by: Marek Vasut Cc: Alper Nebi Yasak Cc: Simon Glass --- tools/binman/etype/fit.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/binman/etype/fit.py b/tools/binman/etype/fit.py index 12306623af6..ad43fce18ec 100644 --- a/tools/binman/etype/fit.py +++ b/tools/binman/etype/fit.py @@ -658,6 +658,7 @@ class Entry_fit(Entry_section): # Build a new tree with all nodes and properties starting from the # entry node fsw = libfdt.FdtSw() + fsw.INC_SIZE = 65536 fsw.finish_reservemap() to_remove = [] loadables = [] -- 2.35.1