From: Kuldeep Singh <quic_kuldsing@quicinc.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Bjorn Andersson <andersson@kernel.org>,
Andy Gross <agross@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Elliot Berman <quic_eberman@quicinc.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
Guru Das Srinagesh <quic_gurus@quicinc.com>,
Andrew Halaney <ahalaney@redhat.com>,
"Maximilian Luz" <luzmaximilian@gmail.com>,
Alex Elder <elder@linaro.org>,
"Srini Kandagatla" <srinivas.kandagatla@linaro.org>,
Arnd Bergmann <arnd@arndb.de>, <linux-arm-msm@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>, <kernel@quicinc.com>,
"Bartosz Golaszewski" <bartosz.golaszewski@linaro.org>,
Deepti Jaggi <quic_djaggi@quicinc.com>
Subject: Re: [PATCH v7 02/12] firmware: qcom: scm: enable the TZ mem allocator
Date: Mon, 26 Feb 2024 15:59:56 +0530 [thread overview]
Message-ID: <20240226102955.GA19256@hu-kuldsing-hyd.qualcomm.com> (raw)
In-Reply-To: <CAMRc=Mc_iwMzKznfUknm+RwS3jN_GimpirdTDVCPtnYYS_1PNg@mail.gmail.com>
> > > As we're not moving from the callers freely allocating what they need,
> > > to a fixed sized pool of 256kb. Please document why 256kb was choosen,
> > > so that we have something to fall back on when someone runs out of this
> > > space, or wonders "why not 128kb?".
> > >
> >
> > If you worry about these pools being taken out of the total memory and
> > prefer to have a way to avoid it, I was thinking about another
> > build-time mode for the allocator - one where there's no pool but it
> > just allocates chunks using dma_alloc_coherent() like before and pool
> > size is ignored. Does it sound good?
> >
>
> Or we could even have an argument for the initial size of the pool and
> then once it's exhausted, we'd add a new chunk (maybe twice the size?)
> and so on.
Hi Bartosz,
Thanks for shmbridge patch series. Few questions.
1. With current design of every client maintaining it's own pool,
For any target, we might end up occupying lot more space by
different clients than we actually need.
2. Also, there's no option to configure pool size for each client at
runtime level and a fixed 256K value is chosen for qcom_scm/qseecom.
Pool size will be same for each target and thus making it less
scalabale if there's adjustment needed at target specific level.
Ex: For a low DDR memory target, pool size should scale down accordingly
as 256K will become a big ask but there's no way to choose specific pool
size for just one target.
2.1 One way to do configure custom pool size value is to add new
property in qcom_scm/qseecom or client DT node and then create
pool of size with this provided value. Though there are ways to
tackle this, but still clients specifying it's own pool size
will always fetch more CMA region than what is actually needed.
Can you please share your ideas as well for upcoming version.
Regards
Kuldeep
next prev parent reply other threads:[~2024-02-26 10:30 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-05 18:27 [PATCH v7 00/12] arm64: qcom: add and enable SHM Bridge support Bartosz Golaszewski
2024-02-05 18:27 ` [PATCH v7 01/12] firmware: qcom: add a dedicated TrustZone buffer allocator Bartosz Golaszewski
2024-02-18 3:22 ` Bjorn Andersson
2024-02-19 13:18 ` Bartosz Golaszewski
2024-02-05 18:28 ` [PATCH v7 02/12] firmware: qcom: scm: enable the TZ mem allocator Bartosz Golaszewski
2024-02-18 3:25 ` Bjorn Andersson
2024-02-21 18:39 ` Bartosz Golaszewski
2024-02-22 13:54 ` Bartosz Golaszewski
2024-02-26 10:29 ` Kuldeep Singh [this message]
2024-02-27 8:24 ` Bartosz Golaszewski
2024-02-05 18:28 ` [PATCH v7 03/12] firmware: qcom: scm: smc: switch to using the SCM allocator Bartosz Golaszewski
2024-02-05 18:28 ` [PATCH v7 04/12] firmware: qcom: scm: make qcom_scm_assign_mem() use the TZ allocator Bartosz Golaszewski
2024-02-05 18:28 ` [PATCH v7 05/12] firmware: qcom: scm: make qcom_scm_ice_set_key() " Bartosz Golaszewski
2024-02-05 18:28 ` [PATCH v7 06/12] firmware: qcom: scm: make qcom_scm_lmh_dcvsh() " Bartosz Golaszewski
2024-02-05 18:28 ` [PATCH v7 07/12] firmware: qcom: scm: make qcom_scm_qseecom_app_get_id() " Bartosz Golaszewski
2024-02-05 18:28 ` [PATCH v7 08/12] firmware: qcom: qseecom: convert to using " Bartosz Golaszewski
2024-02-18 3:08 ` Bjorn Andersson
2024-02-20 9:54 ` Bartosz Golaszewski
2024-02-27 16:53 ` Bjorn Andersson
2024-03-03 16:18 ` Bartosz Golaszewski
2024-03-16 17:24 ` Bjorn Andersson
2024-02-05 18:28 ` [PATCH v7 09/12] firmware: qcom: scm: add support for SHM bridge operations Bartosz Golaszewski
2024-02-05 18:28 ` [PATCH v7 10/12] firmware: qcom: tzmem: enable SHM Bridge support Bartosz Golaszewski
2024-02-18 3:41 ` Bjorn Andersson
2024-02-21 19:06 ` Bartosz Golaszewski
2024-02-22 16:24 ` Bartosz Golaszewski
2024-02-27 16:56 ` Bjorn Andersson
2024-02-05 18:28 ` [PATCH v7 11/12] firmware: qcom: scm: clarify the comment in qcom_scm_pas_init_image() Bartosz Golaszewski
2024-02-18 3:50 ` Bjorn Andersson
2024-03-01 18:49 ` Prasad Sodagudi
2024-03-16 17:27 ` Bjorn Andersson
2024-02-05 18:28 ` [PATCH v7 12/12] arm64: defconfig: enable SHM Bridge support for the TZ memory allocator Bartosz Golaszewski
2024-02-13 16:34 ` [PATCH v7 00/12] arm64: qcom: add and enable SHM Bridge support Bartosz Golaszewski
2024-02-17 19:58 ` Bjorn Andersson
2024-02-19 15:17 ` Srinivas Kandagatla
2024-02-27 16:32 ` Bjorn Andersson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240226102955.GA19256@hu-kuldsing-hyd.qualcomm.com \
--to=quic_kuldsing@quicinc.com \
--cc=agross@kernel.org \
--cc=ahalaney@redhat.com \
--cc=andersson@kernel.org \
--cc=arnd@arndb.de \
--cc=bartosz.golaszewski@linaro.org \
--cc=brgl@bgdev.pl \
--cc=elder@linaro.org \
--cc=kernel@quicinc.com \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luzmaximilian@gmail.com \
--cc=quic_djaggi@quicinc.com \
--cc=quic_eberman@quicinc.com \
--cc=quic_gurus@quicinc.com \
--cc=srinivas.kandagatla@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox