[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a289c4ed-7a05-76ea-edfc-3148cfd6c020@linaro.org>
Date: Tue, 1 Aug 2023 13:29:16 +0200
From: Konrad Dybcio <konrad.dybcio@...aro.org>
To: Stephan Gerhold <stephan@...hold.net>
Cc: Andy Gross <agross@...nel.org>,
Bjorn Andersson <andersson@...nel.org>,
Georgi Djakov <djakov@...nel.org>,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>,
Marijn Suijten <marijn.suijten@...ainline.org>,
linux-arm-msm@...r.kernel.org, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-clk@...r.kernel.org
Subject: Re: [PATCH v2 03/10] interconnect: qcom: icc-rpm: Let nodes drive
their own bus clock
On 1.08.2023 12:58, Stephan Gerhold wrote:
> On Mon, Jul 31, 2023 at 12:52:19PM +0200, Konrad Dybcio wrote:
>> If this hardware couldn't get messier, some nodes are supposed to drive
>> their own bus clock.. Presumably to connect to some intermediate
>> interface between the node itself and the bus it's (supposed to be)
>> connected to.
>>
>> Expand the node struct with the necessary data and hook up the
>> allocations & calculations.
>>
>> To save on memory (not very many nodes have their own clocks), allocate
>> a pointer to an array instead of allocating an array within
>> qcom_icc_node.
>>
>
> Only on ARM32 though. On ARM64 you waste extra memory:
>
> u32 bus_clk_rate[QCOM_SMD_RPM_STATE_NUM];
> sizeof(bus_clk_rate) = QCOM_SMD_RPM_STATE_NUM * sizeof(bus_clk_rate[0])
> = 2 * 4
> = 8
>
> u32 *bus_clk_rate;
> sizeof(bus_clk_rate) = sizeof(ptr)
> = 8 (for ARM64)
> + 2 * 4 + malloc overhead
> for each node with bus_clk_desc
>
> which is > 8 from above.
>
> I'm not quite convinced this optimization is worth it.
Right, u32 is not the same size as *u32, brain fart :D
Konrad
Powered by blists - more mailing lists