From: Qiang Yu <quic_qianyu@quicinc.com>
To: Jeffrey Hugo <quic_jhugo@quicinc.com>, <mani@kernel.org>,
<loic.poulain@linaro.org>
Cc: <mhi@lists.linux.dev>, <linux-arm-msm@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <quic_cang@quicinc.com>,
<mrana@quicinc.com>
Subject: Re: [PATCH] bus: mhi: host: Disable preemption while processing data events
Date: Tue, 8 Nov 2022 14:54:42 +0800 [thread overview]
Message-ID: <cba37503-c8bc-b14f-39db-34dd0fa09c32@quicinc.com> (raw)
In-Reply-To: <25b67462-d6a6-c564-6830-694b726bd1d9@quicinc.com>
On 11/7/2022 11:00 PM, Jeffrey Hugo wrote:
> On 11/3/2022 1:55 AM, Qiang Yu wrote:
>> If data processing of an event is scheduled out because core
>> is busy handling multiple irqs, this can starves the processing
>> of MHI M0 state change event on another core. Fix this issue by
>> disabling irq on the core processing data events.
>
> Can you elaborate on the scenario more?
>
> If a device hasn't entered M0, then what event could be processed?
The scenario is following:
1. On Core 2 IPCR channel 20 transfer completion event MSI arrived which
is processed by holding Event ring 1 lock by calling spin_lock_bh() in
normal priority tasklet.
2. On Core 2 multiple irqs come in and scheduled out the event ring
processing done by #1. Due to that event ring lock remained acquired but
event ring processing for IPCR got scheduled out.
3. On Core 1, primary event ring MSI arrived for M0, which is handled by
a separate MHI hi-priority tasklet. As part of M0 state transition,
tasklet goes over event ring 1 and tries to acquire event ring 1 lock in
order to ring the event ring DB, but just gets stuck in busy wait due to
#2.
At this point tasklet is at the mercy of the muiltiple irqs handle
(which scheduled out the MHI tasklet of #1) to finish and let the MHI
normal priority tasklet to run.
prev parent reply other threads:[~2022-11-08 6:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-03 7:55 [PATCH] bus: mhi: host: Disable preemption while processing data events Qiang Yu
2022-11-07 11:22 ` Manivannan Sadhasivam
2022-11-07 15:00 ` Jeffrey Hugo
2022-11-08 6:54 ` Qiang Yu [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=cba37503-c8bc-b14f-39db-34dd0fa09c32@quicinc.com \
--to=quic_qianyu@quicinc.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=loic.poulain@linaro.org \
--cc=mani@kernel.org \
--cc=mhi@lists.linux.dev \
--cc=mrana@quicinc.com \
--cc=quic_cang@quicinc.com \
--cc=quic_jhugo@quicinc.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