From: "Asutosh Das (asd)" <asutoshd@codeaurora.org>
To: Stanley Chu <stanley.chu@mediatek.com>,
linux-scsi@vger.kernel.org, martin.petersen@oracle.com,
avri.altman@wdc.com, alim.akhtar@samsung.com,
pedrom.sousa@synopsys.com, jejb@linux.ibm.com,
matthias.bgg@gmail.com
Cc: linux-mediatek@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, beanhuo@micron.com,
kuohong.wang@mediatek.com, peter.wang@mediatek.com,
chun-hung.wu@mediatek.com, andy.teng@mediatek.com
Subject: Re: [PATCH v1 2/2] scsi: ufs: disable interrupt during clock-gating
Date: Tue, 17 Dec 2019 15:25:27 -0800 [thread overview]
Message-ID: <a36d111e-ef7f-9f9b-6f6a-692a9980103a@codeaurora.org> (raw)
In-Reply-To: <1575721321-8071-3-git-send-email-stanley.chu@mediatek.com>
On 12/7/2019 4:22 AM, Stanley Chu wrote:
> Similar to suspend, ufshcd interrupt can be disabled since
> there won't be any host controller transaction expected till
> clocks ungated.
>
> Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
> ---
> drivers/scsi/ufs/ufshcd.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index f80bd4e811cb..5de105e82c32 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -1490,6 +1490,8 @@ static void ufshcd_ungate_work(struct work_struct *work)
> spin_unlock_irqrestore(hba->host->host_lock, flags);
> ufshcd_setup_clocks(hba, true);
>
> + ufshcd_enable_irq(hba);
> +
> /* Exit from hibern8 */
> if (ufshcd_can_hibern8_during_gating(hba)) {
> /* Prevent gating in this path */
> @@ -1636,6 +1638,8 @@ static void ufshcd_gate_work(struct work_struct *work)
> ufshcd_set_link_hibern8(hba);
> }
>
> + ufshcd_disable_irq(hba);
> +
> if (!ufshcd_is_link_active(hba))
> ufshcd_setup_clocks(hba, false);
> else
>
Hi,
Does this save significant power? I see that gate/ungate of clocks
happen far too frequently than suspend/resume.
Have you considered how much latency this would add to the
gating/ungating path?
-asd
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
Linux Foundation Collaborative Project
next prev parent reply other threads:[~2019-12-17 23:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-07 12:21 [PATCH v1 0/2] scsi: ufs: fixup active period of ufshcd interrupt Stanley Chu
2019-12-07 12:22 ` [PATCH v1 1/2] scsi: ufs: disable irq before disabling clocks Stanley Chu
2019-12-07 12:22 ` [PATCH v1 2/2] scsi: ufs: disable interrupt during clock-gating Stanley Chu
2019-12-17 23:25 ` Asutosh Das (asd) [this message]
2019-12-18 3:52 ` Stanley Chu
2019-12-18 23:37 ` Asutosh Das (asd)
2019-12-13 2:48 ` [PATCH v1 0/2] scsi: ufs: fixup active period of ufshcd interrupt Stanley Chu
2019-12-17 7:38 ` Avri Altman
2019-12-19 23:04 ` Martin K. Petersen
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=a36d111e-ef7f-9f9b-6f6a-692a9980103a@codeaurora.org \
--to=asutoshd@codeaurora.org \
--cc=alim.akhtar@samsung.com \
--cc=andy.teng@mediatek.com \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=chun-hung.wu@mediatek.com \
--cc=jejb@linux.ibm.com \
--cc=kuohong.wang@mediatek.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=matthias.bgg@gmail.com \
--cc=pedrom.sousa@synopsys.com \
--cc=peter.wang@mediatek.com \
--cc=stanley.chu@mediatek.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).