From: "Asutosh Das (asd)" <asutoshd@codeaurora.org>
To: Stanley Chu <stanley.chu@mediatek.com>
Cc: linux-scsi@vger.kernel.org, martin.petersen@oracle.com,
andy.teng@mediatek.com, jejb@linux.ibm.com,
chun-hung.wu@mediatek.com, kuohong.wang@mediatek.com,
linux-kernel@vger.kernel.org, avri.altman@wdc.com,
linux-mediatek@lists.infradead.org, peter.wang@mediatek.com,
alim.akhtar@samsung.com, matthias.bgg@gmail.com,
pedrom.sousa@synopsys.com, linux-arm-kernel@lists.infradead.org,
beanhuo@micron.com
Subject: Re: [PATCH v1 2/2] scsi: ufs: disable interrupt during clock-gating
Date: Wed, 18 Dec 2019 15:37:26 -0800 [thread overview]
Message-ID: <7756630e-adf2-47e9-4815-ba2306a9dd16@codeaurora.org> (raw)
In-Reply-To: <1576641171.13056.16.camel@mtkswgap22>
On 12/17/2019 7:52 PM, Stanley Chu wrote:
> Hi Asutosh,
>
> On Tue, 2019-12-17 at 15:25 -0800, Asutosh Das (asd) wrote:
>>>
>>
>> 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
>>
>
> Yes, we have measured 200 times clk-gating/clk-ungating and latency data
> is showed as below,
>
> For clk-gating with interrupt disabling toggled,
>
> Average latency of each clk-gating: 55.117 us
> Average latency of irq-disabling during clk-gating: 4.2 us
>
> For clk-ungating with interrupt enabling toggled,
> Average latency of each clk-ungating: 118.324 us
> Average latency of irq-enabling during clk-ungating: 2.9 us
>
> The evaluation here is based on below Can's patch therefore the
> interrupt control (enable_irq/disable_irq) latency is much shorter than
> before (request_irq/free_irq).
>
> scsi: ufs: Do not free irq in suspend
> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/scsi/ufs/ufshcd.c?id=8709c1f68536e256668812788af5b2bb027f49c3
>
> BTW, the main purpose of this patch is aimed to protect ufshcd register
> from accessing while host clocks are disabled to fix potential system
> hang issue. The possible scenario is mentioned in commit message of
> patch "scsi: ufs: disable irq before disabling clocks" in the same
> series.
>
> Thanks
> Stanley
>
Reviewed-by: Asutosh Das <asutoshd@codeaurora.org>
Thanks for the data.
It'd be interesting to know more on the - misrouted interrupt recovery
feature though.
-
Thanks
Asutosh
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
Linux Foundation Collaborative Project
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
next prev parent reply other threads:[~2019-12-18 23:37 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)
2019-12-18 3:52 ` Stanley Chu
2019-12-18 23:37 ` Asutosh Das (asd) [this message]
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=7756630e-adf2-47e9-4815-ba2306a9dd16@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