devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guru Das Srinagesh <quic_gurus@quicinc.com>
To: Bjorn Andersson <andersson@kernel.org>
Cc: Sibi Sankar <quic_sibis@quicinc.com>,
	<krzysztof.kozlowski+dt@linaro.org>, <agross@kernel.org>,
	<linux-arm-msm@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <robh+dt@kernel.org>,
	<konrad.dybcio@somainline.org>, <robimarko@gmail.com>,
	<quic_rjendra@quicinc.com>
Subject: Re: [PATCH V6 2/2] firmware: qcom: scm: Add wait-queue handling logic
Date: Mon, 9 Jan 2023 23:56:28 -0800	[thread overview]
Message-ID: <20230110075628.GA2082@quicinc.com> (raw)
In-Reply-To: <20221208221125.bflo7unhcrgfsgbr@builder.lan>

On Dec 08 2022 16:11, Bjorn Andersson wrote:
> On Thu, Dec 08, 2022 at 12:10:31PM +0530, Sibi Sankar wrote:

...

> > +
> > +	err = idr_alloc_u32(&scm->waitq.idr, wq, &wq_ctx_idr,
> > +			    U32_MAX, GFP_ATOMIC);
> 
> PS. Thinking about it further, imagine the firmware people deciding to
> be funny and allocating the wq_ctx in a cyclic fashion. The idr will
> consume all your ram after a while...

Even if wq_ctx is allocated cyclically, say, from 1 to N, only N idrs would
ever be allocated as subsequently there would only be lookups. Could you
elaborate on how we would run out of RAM?

Thank you.

Guru Das.

      reply	other threads:[~2023-01-10  7:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-08  6:40 [PATCH V6 0/2] SCM: Add support for wait-queue aware firmware Sibi Sankar
2022-12-08  6:40 ` [PATCH V6 1/2] dt-bindings: firmware: qcom,scm: Add optional interrupt Sibi Sankar
2022-12-08  7:59   ` Krzysztof Kozlowski
2022-12-08  6:40 ` [PATCH V6 2/2] firmware: qcom: scm: Add wait-queue handling logic Sibi Sankar
2022-12-08 22:11   ` Bjorn Andersson
2023-01-10  7:56     ` Guru Das Srinagesh [this message]

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=20230110075628.GA2082@quicinc.com \
    --to=quic_gurus@quicinc.com \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konrad.dybcio@somainline.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=quic_rjendra@quicinc.com \
    --cc=quic_sibis@quicinc.com \
    --cc=robh+dt@kernel.org \
    --cc=robimarko@gmail.com \
    /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).