LKML Archive on lore.kernel.org
 help / color / Atom feed
From: Sibi Sankar <sibis@codeaurora.org>
To: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: srinivas.kandagatla@linaro.org, robh+dt@kernel.org,
	tsoni@codeaurora.org, agross@kernel.org, mark.rutland@arm.com,
	linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	rnayak@codeaurora.org, linux-remoteproc-owner@vger.kernel.org
Subject: Re: [PATCH 1/3] soc: qcom: Introduce Protection Domain Restart helpers
Date: Wed, 20 Nov 2019 12:12:54 +0000
Message-ID: <0101016e88bacc9e-26ddd827-c0ff-497b-b327-d14dc8832d20-000000@us-west-2.amazonses.com> (raw)
In-Reply-To: <20191119231740.GJ18024@yoga>

On 2019-11-20 04:47, Bjorn Andersson wrote:
> On Tue 19 Nov 02:18 PST 2019, sibis@codeaurora.org wrote:
> 
>> Hey Bjorn,
>> Thanks for taking the time to
>> review the series :)
>> 
>> On 2019-11-19 12:10, Bjorn Andersson wrote:
>> > On Mon 18 Nov 06:27 PST 2019, Sibi Sankar wrote:
>> > > diff --git a/drivers/soc/qcom/pdr_interface.c
>> > > b/drivers/soc/qcom/pdr_interface.c
>> > [..]
>> > > +static void pdr_indack_work(struct work_struct *work)
>> > > +{
>> > > +	struct pdr_handle *pdr = container_of(work, struct pdr_handle,
>> > > +					      indack_work);
>> > > +	struct pdr_list_node *ind, *tmp;
>> > > +	struct pdr_service *pds;
>> > > +
>> > > +	list_for_each_entry_safe(ind, tmp, &pdr->indack_list, node) {
>> > > +		pds = ind->pds;
>> > > +		pdr_send_indack_msg(pdr, pds, ind->transaction_id);
>> >
>> > So when we et a ind_cb with the new status, we need to send an ack
>> > request, which will result in a response, just to confirm that we got
>> > the event?
>> >
>> > Seems like we should fix the qmi code to make it possible to send a
>> > request from the indication handler and then we could simply ignore the
>> 
>> yeah maybe having a provision to send custom requests back on
>> indication would be the way to go. Not all indication need to be
>> services with requests.
>> 
> 
> Let's put this on the todo list.
> 
>> > response. Or do we need to not pdr->status() until we get the response
>> > for some reason?
>> 
>> adsp waits on the ack response for a fixed duration and seems to throw
>> a fatal err is the ack is not serviced. Hence holding back pd->status
>> till we service the ack here.
>> 
> 
> You mean to ensure that someone sleeping in pd->status() doesn't delay
> that until its too late?

yes

> 
> [..]
>> > > +int pdr_handle_init(struct pdr_handle *pdr,
>> > > +		    int (*status)(struct pdr_handle *pdr,
>> > > +				  struct pdr_service *pds))
>> > > +{
>> > [..]
>> > > +	pdr->servreg_wq = create_singlethread_workqueue("pdr_servreg_wq");
>> > > +	if (!pdr->servreg_wq)
>> > > +		return -ENOMEM;
>> > > +
>> > > +	pdr->indack_wq = alloc_ordered_workqueue("pdr_indack_wq",
>> > > WQ_HIGHPRI);
>> >
>> > The two workqueues means that we should be able to call pdr->status()
>> > rom two concurrent contexts, I don't think our clients will expect that.
>> >
>> 
>> would creating another ordered wq to relay all the pd->status make
>> sense?
>> 
> 
> I would prefer less work queues ;) But I presume you split out the
> indack_wq in order to improve the likelihood of meeting the latency
> requirements of the remote side.
> 
> Perhaps just wrap the status() calls with a status-mutex and then 
> remove
> that by reworking the QMI interface to allow us to remove the indack
> work?

okay will fix it in the next
re-spin.

> 
> Regards,
> Bjorn

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project.

  reply index

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20191118142728.30187-1-sibis@codeaurora.org>
2019-11-18 14:27 ` Sibi Sankar
2019-11-18 14:28 ` [PATCH 2/3] dt-bindings: soc: qcom: apr: Add protection domain bindings Sibi Sankar
2019-11-18 14:28 ` [PATCH 3/3] soc: qcom: apr: Add avs/audio tracking functionality Sibi Sankar
     [not found] ` <0101016e7ee9c786-fcf80f4e-9b57-4d6b-8806-9ca408e21b55-000000@us-west-2.amazonses.com>
2019-11-19  5:49   ` [PATCH 2/3] dt-bindings: soc: qcom: apr: Add protection domain bindings Bjorn Andersson
2019-11-21 16:04   ` Srinivas Kandagatla
     [not found] ` <0101016e7ee9be5e-1d6bbe06-4bab-434d-9040-ebfa3918b213-000000@us-west-2.amazonses.com>
2019-11-19  6:40   ` [PATCH 1/3] soc: qcom: Introduce Protection Domain Restart helpers Bjorn Andersson
2019-11-19 10:18     ` sibis
     [not found]     ` <0101016e832bd54d-453473ee-c0fa-44f5-a873-55b97dff4a9a-000000@us-west-2.amazonses.com>
2019-11-19 23:17       ` Bjorn Andersson
2019-11-20 12:12         ` Sibi Sankar [this message]
     [not found] ` <0101016e7ee9d8b5-9759d0ba-4acf-4fc4-a863-fac9c738397f-000000@us-west-2.amazonses.com>
2019-11-19  6:53   ` [PATCH 3/3] soc: qcom: apr: Add avs/audio tracking functionality Bjorn Andersson
2019-11-19 10:25     ` sibis
     [not found] ` <0101016e7ee9c591-d04928e8-6440-488c-a956-3b5c9b8988bf-000000@us-west-2.amazonses.com>
2019-12-03 21:52   ` [PATCH 2/3] dt-bindings: soc: qcom: apr: Add protection domain bindings Rob Herring
2019-12-16 17:46     ` Sibi Sankar

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=0101016e88bacc9e-26ddd827-c0ff-497b-b327-d14dc8832d20-000000@us-west-2.amazonses.com \
    --to=sibis@codeaurora.org \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc-owner@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=rnayak@codeaurora.org \
    --cc=robh+dt@kernel.org \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=tsoni@codeaurora.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

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git
	git clone --mirror https://lore.kernel.org/lkml/8 lkml/git/8.git
	git clone --mirror https://lore.kernel.org/lkml/9 lkml/git/9.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git