From mboxrd@z Thu Jan 1 00:00:00 1970 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 ECD20C433F5 for ; Wed, 23 Mar 2022 18:49:43 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 01B5183F88; Wed, 23 Mar 2022 19:49:41 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="nXMB0V7Z"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B183E83B3A; Wed, 23 Mar 2022 19:49:38 +0100 (CET) Received: from mail-qk1-x733.google.com (mail-qk1-x733.google.com [IPv6:2607:f8b0:4864:20::733]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2C72C83F88 for ; Wed, 23 Mar 2022 19:49:33 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qk1-x733.google.com with SMTP id d142so1817385qkc.4 for ; Wed, 23 Mar 2022 11:49:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=FmmGulqvfzvT31KMZ2vawkmTHJLDCFXYLo9pdQMcPy0=; b=nXMB0V7ZtPN0xLsw2nZOP2byT86sVu15QCya4H1gAFtolJ12Orc8kK8Yvkt2acPjFx GjDaF3BmPZsVtONm86WVc4MVmN0h2LPZx50sFd+xNnz9aCEDtJTwcyfZXIb5UIXXemJS gvCfSJ+icF+p+nbNeCd5eQsOPxqI4PMbz+QXQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=FmmGulqvfzvT31KMZ2vawkmTHJLDCFXYLo9pdQMcPy0=; b=uJOkM1TyNMd8U9z21bCzv6QxhgUP15e0g7FHrydNOcjUKiITfr853WRyxgJKEEsnq8 01s85C2bqjfOXhRMJeoa5137cEByN0fWBawbFhRbNHcxfEQwWFgSIyN2lneUO0NI1kiP X+KuAqO4bsH70eK+9FNfWSOF/aSLRYXVKS+Qc8enthZWj5WsczW7C6ywWlKBnb77al3v cqfOzcwEwocoMbgJicKjPmXAn487Oz8m14NYPP9BTDirkAqayFyMDqNyO4qzODGWLunw dbmYZxzPq/FrIbowm3XZEJ/r6rBtx7n+Ip9WXCsBASUZpK5KPImt6VMhKxRPeSPI/exb hXMA== X-Gm-Message-State: AOAM533WnZ8S2KcPTkFXusORWzbWlSv13iTkJW8pZZjvszaZMsj8wdsS 78kMcCoyQyGp+UOJqqLVmsMxjQ== X-Google-Smtp-Source: ABdhPJzPRdAY0UXzZ7ulGdaoFCpYlQ+BM+6JnL1V+KMtwoPm8giYm7d2d4Xd7hb1jC6/d1qnyUe4Vw== X-Received: by 2002:a37:65d3:0:b0:67e:9cbf:b1ec with SMTP id z202-20020a3765d3000000b0067e9cbfb1ecmr980619qkb.138.1648061371782; Wed, 23 Mar 2022 11:49:31 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-2ef0-5dff-fedb-a8ba.res6.spectrum.com. [2603:6081:7b01:cbda:2ef0:5dff:fedb:a8ba]) by smtp.gmail.com with ESMTPSA id g21-20020ac85815000000b002e06e2623a7sm601728qtg.0.2022.03.23.11.49.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Mar 2022 11:49:30 -0700 (PDT) Date: Wed, 23 Mar 2022 14:49:28 -0400 From: Tom Rini To: Sean Anderson Cc: Heiko Thiery , Simon Glass , Heinrich Schuchardt , Stefano Babic , Fabio Estevam , Peng Fan , U-Boot Mailing List Subject: Re: [PATCH v2] board: kontron: increase the CONFIG_SYS_MALLOC_F_LEN Message-ID: <20220323184928.GK2226424@bill-the-cat> References: <20220321142631.63704-1-heiko.thiery@gmail.com> <19e21ec5-184b-10d9-9bee-8ece6dc58095@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="8J60KZR6DtQGXGd/" Content-Disposition: inline In-Reply-To: <19e21ec5-184b-10d9-9bee-8ece6dc58095@gmail.com> X-Clacks-Overhead: GNU Terry Pratchett 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.5 at phobos.denx.de X-Virus-Status: Clean --8J60KZR6DtQGXGd/ Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 23, 2022 at 02:33:12PM -0400, Sean Anderson wrote: > On 3/23/22 2:26 PM, Heiko Thiery wrote: > > Hi Simon, > >=20 > > Am Mi., 23. M=E4rz 2022 um 19:04 Uhr schrieb Simon Glass : > > >=20 > > > Hi Heinrich, > > >=20 > > > On Tue, 22 Mar 2022 at 03:25, Heinrich Schuchardt wrote: > > > >=20 > > > > On 3/21/22 15:26, Heiko Thiery wrote: > > > > > It was observed that enabling additional DM modules the configured > > > > > malloc value is not sufficient. So lets increase the value. > > > > >=20 > > > > > Signed-off-by: Heiko Thiery > > > > > --- > > > > > v2: > > > > > - add a more proper commit message to explan why the value was= increased > > > > >=20 > > > > > configs/kontron_pitx_imx8m_defconfig | 1 + > > > > > 1 file changed, 1 insertion(+) > > > > >=20 > > > > > diff --git a/configs/kontron_pitx_imx8m_defconfig b/configs/kontr= on_pitx_imx8m_defconfig > > > > > index 76430213e3..30c3586937 100644 > > > > > --- a/configs/kontron_pitx_imx8m_defconfig > > > > > +++ b/configs/kontron_pitx_imx8m_defconfig > > > > > @@ -2,6 +2,7 @@ CONFIG_ARM=3Dy > > > > > CONFIG_ARCH_IMX8M=3Dy > > > > > CONFIG_SYS_TEXT_BASE=3D0x40200000 > > > > > CONFIG_SYS_MALLOC_LEN=3D0x600000 > > > > > +CONFIG_SYS_MALLOC_F_LEN=3D0x10000 > > > >=20 > > > > @Heiko > > > > Should we really adjust this on board level? Won't we have the same > > > > problem on all imx8m boards? > > > >=20 > > > > Why don't you change the default for all i.mx8 boards in /Kconfig? > > > >=20 > > > > @Tom, @Simon > > > > Shouldn't we replace the default of 0x400 by 0x2000 generally? > > >=20 > > > I don't think that is a good idea. That is a lot of memory! Many > > > platforms don't need that much. > > >=20 > > > I wonder what is driving this large amount. Is it pinctrl? > >=20 > > The increase comes from the introduction of a clock driver for the > > imx8mq platform. >=20 > Yes, the problem is that CCF creates a udevice+clk+private data for > every clock. This runs about 150-200 bytes per clock on a 64-bit > platform. In addition, many physical clocks are modeled as several > logical clocks plus a composite. This means a platform with maybe > 20-30 physical clocks can easily allocate 10k-20k to create > the clock tree. And to cycle back to what I mentioned on IRC at some point, I disagree with the notion many platforms don't need "that" might. Yes, 0x10000 tends to be on the higher end, but there's larger still boards, but we should likely set a new default X if DM (and similar, default Y if SPL_DM, and Z for TPL) and bump the boards up that are below that but more than current default, to that default. A value of 0x400 is unreasonably small for DM and likely anything less than 0x4000 (what sandbox picks) is going to be problematic. --=20 Tom --8J60KZR6DtQGXGd/ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmI7a7UACgkQFHw5/5Y0 tywYWQv/TTZHUO+HIxtT6SN0LrlQHALYuk1hKef7WYccIoxyqS4nxBNu6hZT9q5g DwRURJHpDf9ro8HGjD007xqXTLQxwYrxF+4LDfPpDKwWdnyJFbSdrxTZrttgHMKw f3sq/PLm03s/S8xsz0adKXeF3s+exRESQP6B74mTsiU9B+JWGizFH2YM+bMpz43U Xv0Ql2CD4JwL7SWrPUwM2YRexajbSeqWXycOWEpWTfWOxSvOKvkzkIeMTKc9sLpX wnue4lLg+ehM79SH1ot+ylYNwMjORn+WOcfOeNtCbgPU269RgGbFf1nHazo2SQmU lKaFAlQesHCSUwBhEz+NXaUqcarneu9mtaAhLwAayUil68YCLftLntfLWuuo6g7x gYHbHn/9xzf3LAxtgTdrvTljzi81sWixRwWRjfLysXP/7LQ8+TryACcJG5xoWVvO K9YMgWrVt30Q13u30YWbW1TDIhIq0EFbVtZQ62MY34GzAuRrl3j4UafRFf67VkDu kVXdghNY =mr4L -----END PGP SIGNATURE----- --8J60KZR6DtQGXGd/--