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 C11BCC433EF for ; Wed, 23 Mar 2022 19:00:15 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E077183FAE; Wed, 23 Mar 2022 20:00:11 +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="K2MWa6kd"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2FA6083F55; Wed, 23 Mar 2022 20:00:05 +0100 (CET) Received: from mail-qv1-xf2f.google.com (mail-qv1-xf2f.google.com [IPv6:2607:f8b0:4864:20::f2f]) (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 944D183B3A for ; Wed, 23 Mar 2022 19:59:57 +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-qv1-xf2f.google.com with SMTP id ke15so1956018qvb.11 for ; Wed, 23 Mar 2022 11:59:57 -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=WY7GLmHluXJRGn8lgBkpqEUdS1IyIOKaCmUdagNBNfI=; b=K2MWa6kdPuZgdU4ldUHxGneN5UOvr3kX7geEGVai9i89IyvoLXutBs5n08h+Re3PI5 Abe1ej/fN+9Mp984QuzB965oMv93f0sBc/82NKh7i4KLHWipvj+vOHWU7lMEy2oRUQ7C pFbe70/tswxBCZrhmPgn25Xjv/74xLxh5FQYs= 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=WY7GLmHluXJRGn8lgBkpqEUdS1IyIOKaCmUdagNBNfI=; b=b1StVw5/8wvvhB63nD4NAcSIpZmfF8T1rHws+oj3HjiIiuAP6wKJaa1J1lx1yABRh6 ncrM1ZH+0qm6J3oM1gcun3Gy23iSiGhSA3GuyInGgAqS83105IELL6i3VJuBsca7qXUJ cKKy1rhA0wkSG+g1Erl5hVF6yBnTsQy3ZgnR/tDJbDlSdqgaFb2bPkza8wRfErhEJWfc TtV4A8WoYscQ7h+NffQO4xPlVDw/iZPNQL/UmKsJTFV1BnxP6DOC967zONt87Rxj67D1 PIK6fpFhZ0dcOLZhThA3Zx4oggINk/WEACNQkqE1IDyFDplDlYCYl3m0/oiYYMoVhX3V b0JA== X-Gm-Message-State: AOAM531WtieqPlk3azEiP+oBqxqzQZjwBx4p0lO76FnE/piInrlph14O urNGAa+fIA4jvMwKx1vFfcqcZw== X-Google-Smtp-Source: ABdhPJx9XaKSpMEwdhhiqhZ75qn1k95XK6IOiow1x3GKdZewFXu34U/oB+9zVdIxQPxvRIGkAaEP7Q== X-Received: by 2002:a05:6214:5088:b0:441:96d:4271 with SMTP id kk8-20020a056214508800b00441096d4271mr1158261qvb.70.1648061996444; Wed, 23 Mar 2022 11:59:56 -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 p8-20020a05620a22e800b0067e75955f5esm355352qki.77.2022.03.23.11.59.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Mar 2022 11:59:55 -0700 (PDT) Date: Wed, 23 Mar 2022 14:59:53 -0400 From: Tom Rini To: Simon Glass Cc: Sean Anderson , Heiko Thiery , 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: <20220323185953.GL2226424@bill-the-cat> References: <20220321142631.63704-1-heiko.thiery@gmail.com> <19e21ec5-184b-10d9-9bee-8ece6dc58095@gmail.com> <20220323184928.GK2226424@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="6Fzmsq5qk3/aYyX1" Content-Disposition: inline In-Reply-To: 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 --6Fzmsq5qk3/aYyX1 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 23, 2022 at 12:53:59PM -0600, Simon Glass wrote: > Hi Tom, >=20 > On Wed, 23 Mar 2022 at 12:49, Tom Rini wrote: > > > > 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, > > > > > > > > Am Mi., 23. M=E4rz 2022 um 19:04 Uhr schrieb Simon Glass : > > > > > > > > > > Hi Heinrich, > > > > > > > > > > On Tue, 22 Mar 2022 at 03:25, Heinrich Schuchardt wrote: > > > > > > > > > > > > On 3/21/22 15:26, Heiko Thiery wrote: > > > > > > > It was observed that enabling additional DM modules the confi= gured > > > > > > > malloc value is not sufficient. So lets increase the value. > > > > > > > > > > > > > > Signed-off-by: Heiko Thiery > > > > > > > --- > > > > > > > v2: > > > > > > > - add a more proper commit message to explan why the value= was increased > > > > > > > > > > > > > > configs/kontron_pitx_imx8m_defconfig | 1 + > > > > > > > 1 file changed, 1 insertion(+) > > > > > > > > > > > > > > diff --git a/configs/kontron_pitx_imx8m_defconfig b/configs/k= ontron_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 > > > > > > > > > > > > @Heiko > > > > > > Should we really adjust this on board level? Won't we have the = same > > > > > > problem on all imx8m boards? > > > > > > > > > > > > Why don't you change the default for all i.mx8 boards in /Kconf= ig? > > > > > > > > > > > > @Tom, @Simon > > > > > > Shouldn't we replace the default of 0x400 by 0x2000 generally? > > > > > > > > > > I don't think that is a good idea. That is a lot of memory! Many > > > > > platforms don't need that much. > > > > > > > > > > I wonder what is driving this large amount. Is it pinctrl? > > > > > > > > The increase comes from the introduction of a clock driver for the > > > > imx8mq platform. > > > > > > 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 > Perhaps we can set the default for something that doesn't use CCF, to > start? It seems that CCF can really blow things up, so we could have a > larger default when that is used. I think this is just the example of the day of the more general issue. There's 369 boards setting a non-default value for CONFIG_SYS_MALLOC_F_LEN. A bunch of them are overriding their already non-0x400 default provided in ./Kconfig. More attention and thought about what to do here is needed. And probably bumping the default for DM cases up. --=20 Tom --6Fzmsq5qk3/aYyX1 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmI7biUACgkQFHw5/5Y0 tyxgiAwAlWoayytuZxSdyq8TgFILdQ/Uwn6rUjibBsdmWPwHP0ZemVDSYeJdae+p /smH2t7SXBamH0SJBy01nPYFZStkSqb1dLW9IsW9+8X7CIc/OOsVa/gqnGNnXNzz chT4HUrpQJJG0bMKT6L6bkcxz8okA6R+ai7Jtz3TGUMA90C5iQjFz4TPc3wUA0w/ 2XZX/AiIZEXKaQF1av7E6gVv7nL9A1xB6E1W33Dfpv//l0uZOPNToq8MKr7MVN3b WwCXHLC46XXS0y+v5f6fONwOj9n5Z+LzUjOeDnj4TGkqgAT5fxo33SdG1IFAwuk4 RcvoLxXAZZ895XIrNs48GPuUSw7u5boDgNTPAG77QsGWiouqKWvKNozXEOqMAB+q xe3AmhZNulLFUKJN+j6iPhg1R1XiomQLD1I3hfppem/xOEjweYz6gE4EaIAKNv1Q KVmIQQdF5pjAfPIpqoTnW1onB+ZRxH2+ZCsxv+6TY48PJdDkT3VJvfjprnRax4op ZQb2WLa4 =KFBH -----END PGP SIGNATURE----- --6Fzmsq5qk3/aYyX1--