From: Cristian Marussi <cristian.marussi@arm.com>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: Cristian Marussi <cristian.marussi@arm.com>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, arm-scmi@vger.kernel.org,
devicetree@vger.kernel.org, sudeep.holla@arm.com,
james.quinlan@broadcom.com, vincent.guittot@linaro.org,
etienne.carriere@st.com, peng.fan@oss.nxp.com,
michal.simek@amd.com, quic_sibis@quicinc.com,
quic_nkela@quicinc.com, dan.carpenter@linaro.org,
souvik.chakravarty@arm.com, robh@kernel.org, krzk+dt@kernel.org,
Peng Fan <peng.fan@nxp.com>
Subject: Re: [PATCH v1 3/6] firmware: arm_scmi: Use max-rx-timeout-ms from devicetree
Date: Mon, 16 Sep 2024 10:54:40 +0100 [thread overview]
Message-ID: <Zuf_3D636c3JXypF@pluto> (raw)
In-Reply-To: <1ea7fff0-149d-408a-b5a7-1b223e8509d0@gmail.com>
On Thu, Sep 12, 2024 at 02:05:53PM -0700, Florian Fainelli wrote:
> On 7/30/24 07:47, Cristian Marussi wrote:
> > Override default maximum RX timeout with the value picked from the
> > devicetree, when provided.
> >
> > Suggested-by: Peng Fan <peng.fan@nxp.com>
> > Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
> > ---
> > drivers/firmware/arm_scmi/driver.c | 9 +++++++++
> > 1 file changed, 9 insertions(+)
> >
> > diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c
> > index 332cd5207bbc..e7dab0eea540 100644
> > --- a/drivers/firmware/arm_scmi/driver.c
> > +++ b/drivers/firmware/arm_scmi/driver.c
> > @@ -2964,6 +2964,7 @@ static int scmi_debugfs_raw_mode_setup(struct scmi_info *info)
> > static const struct scmi_desc *scmi_transport_setup(struct device *dev)
> > {
> > struct scmi_transport *trans;
> > + int ret;
> > trans = dev_get_platdata(dev);
> > if (!trans || !trans->desc || !trans->supplier || !trans->core_ops)
> > @@ -2980,6 +2981,14 @@ static const struct scmi_desc *scmi_transport_setup(struct device *dev)
> > dev_info(dev, "Using %s\n", dev_driver_string(trans->supplier));
> > + ret = of_property_read_u32(dev->of_node, "max-rx-timeout-ms",
> > + &trans->desc->max_rx_timeout_ms);
> > + if (ret && ret != -EINVAL)
> > + dev_err(dev, "Malformed max-rx-timeout-ms DT property.\n");
> > +
> > + dev_info(dev, "SCMI max-rx-timeout: %dms\n",
> > + trans->desc->max_rx_timeout_ms);
>
Hi Florian,
> I am bit on the fence on that change, it is useful, and we have done similar
> things before using a command line parameter.
>
I think the requirement around this as it came from from NXP/Peng was that,
depending on the design (HW/FW) of the SCMI platform at hand it can be that
the same default transport timeout (that is by itself much larger than
usually needed) could still be not enough for the transport: I think the
example was mentioning a system with many agents, so that your request
could end-up been "bootle-necked" in the execution queue of the server (AFAIU)
In such a case (if you cannot avoid the issue at first by reviewing your
design...) you have the effective need of describing that specific
platform/transport timeout characteristic and override the built-in default....
...it was not meant to be usead as a plain configuration....even though I
suppose this is sort of a matter of interepretation (and that can be
abused downstream...)
> This is definitively useful when bringing up new systems where you might be
> sprinkling enough debugging messages that this pushes your message
> processing logic too close to the default 30ms timeout. For normal use
> cases, we really want the message timeout to be as small as possible for
> most SCMI traffic but if we want the timeout to be configurable, that might
> have have to be on a per-message basis.
A per-message timeout would need a lot of re-design, but how would you tune
then all the possibly different timeouts across different platforms and/or
transports combinations...this seems something that could need a lot of
runtime calibration and re-configuration on a live system....
...have you specifically seen the need for such varying per-message
timeout in some specific case ?
Thanks,
Cristian
next prev parent reply other threads:[~2024-09-16 9:54 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-30 14:47 [PATCH v1 0/6] Add SCMI transport descriptors Cristian Marussi
2024-07-30 14:47 ` [PATCH v1 1/6] firmware: arm_scmi: Remove const from " Cristian Marussi
2024-07-30 14:47 ` [PATCH v1 2/6] dt-bindings: firmware: arm,scmi: Introduce property max-rx-timeout-ms Cristian Marussi
2024-07-30 14:47 ` [PATCH v1 3/6] firmware: arm_scmi: Use max-rx-timeout-ms from devicetree Cristian Marussi
2024-09-12 21:05 ` Florian Fainelli
2024-09-16 9:54 ` Cristian Marussi [this message]
2024-07-30 14:47 ` [PATCH v1 4/6] dt-bindings: firmware: arm,scmi: Introduce more transport properties Cristian Marussi
2024-07-30 14:47 ` [PATCH v1 5/6] firmware: arm_scmi: Use max_msg and max_msg_size from devicetree Cristian Marussi
2024-08-20 14:48 ` Sudeep Holla
2024-09-12 19:22 ` Nikunj Kela
2024-09-16 14:14 ` Cristian Marussi
2024-07-30 14:47 ` [PATCH v1 6/6] firmware: arm_scmi: Relocate atomic_threshold to scmi_desc Cristian Marussi
2024-07-31 13:13 ` [PATCH v1 0/6] Add SCMI transport descriptors Peng Fan
2024-07-31 13:58 ` Cristian Marussi
2024-08-01 19:17 ` Nikunj Kela
2024-08-01 19:23 ` Cristian Marussi
2024-08-01 19:44 ` Nikunj Kela
2024-08-20 14:39 ` Sudeep Holla
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=Zuf_3D636c3JXypF@pluto \
--to=cristian.marussi@arm.com \
--cc=arm-scmi@vger.kernel.org \
--cc=dan.carpenter@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=etienne.carriere@st.com \
--cc=f.fainelli@gmail.com \
--cc=james.quinlan@broadcom.com \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@amd.com \
--cc=peng.fan@nxp.com \
--cc=peng.fan@oss.nxp.com \
--cc=quic_nkela@quicinc.com \
--cc=quic_sibis@quicinc.com \
--cc=robh@kernel.org \
--cc=souvik.chakravarty@arm.com \
--cc=sudeep.holla@arm.com \
--cc=vincent.guittot@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;
as well as URLs for NNTP newsgroup(s).