linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bus: mhi: pci_generic: Increase num of elements in hw event ring
@ 2021-02-05  8:36 Loic Poulain
  2021-02-05 12:02 ` Manivannan Sadhasivam
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Loic Poulain @ 2021-02-05  8:36 UTC (permalink / raw)
  To: manivannan.sadhasivam, hemantk; +Cc: linux-arm-msm, Loic Poulain

We met some sporadic modem crashes during high throughput testing, this
has been root caused to a lack of elements in the event ring. Indeed,
the modem is simply crashing when event ring becomes empty.

It appears that the total number event ring elements is too low given
the performances of the modem (IPA hardware accelerator). This change
increases the number of elements in the hardware event ring to 2048,
which is aligned with what is defined in downstream version:
https://source.codeaurora.org/quic/la/kernel/msm-4.14/tree/arch/arm64/boot/dts/qcom/sm8150-mhi.dtsi?h=msm-4.14#n482

With this change, modem coes not crash anymore.

Note: An event ring element is 16-Byte, so the total memory usage of
a hardware event ring is now 32KB.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
---
 drivers/bus/mhi/pci_generic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bus/mhi/pci_generic.c b/drivers/bus/mhi/pci_generic.c
index 5b3a23a4..c20f59e 100644
--- a/drivers/bus/mhi/pci_generic.c
+++ b/drivers/bus/mhi/pci_generic.c
@@ -129,7 +129,7 @@ struct mhi_pci_dev_info {
 
 #define MHI_EVENT_CONFIG_HW_DATA(ev_ring, ch_num) \
 	{					\
-		.num_elements = 256,		\
+		.num_elements = 2048,		\
 		.irq_moderation_ms = 1,		\
 		.irq = (ev_ring) + 1,		\
 		.priority = 1,			\
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] bus: mhi: pci_generic: Increase num of elements in hw event ring
  2021-02-05  8:36 [PATCH] bus: mhi: pci_generic: Increase num of elements in hw event ring Loic Poulain
@ 2021-02-05 12:02 ` Manivannan Sadhasivam
  2021-02-05 12:34 ` Manivannan Sadhasivam
  2021-03-01 19:59 ` patchwork-bot+linux-arm-msm
  2 siblings, 0 replies; 5+ messages in thread
From: Manivannan Sadhasivam @ 2021-02-05 12:02 UTC (permalink / raw)
  To: Loic Poulain; +Cc: hemantk, linux-arm-msm

On Fri, Feb 05, 2021 at 09:36:35AM +0100, Loic Poulain wrote:
> We met some sporadic modem crashes during high throughput testing, this
> has been root caused to a lack of elements in the event ring. Indeed,
> the modem is simply crashing when event ring becomes empty.
> 
> It appears that the total number event ring elements is too low given
> the performances of the modem (IPA hardware accelerator). This change
> increases the number of elements in the hardware event ring to 2048,
> which is aligned with what is defined in downstream version:
> https://source.codeaurora.org/quic/la/kernel/msm-4.14/tree/arch/arm64/boot/dts/qcom/sm8150-mhi.dtsi?h=msm-4.14#n482
> 
> With this change, modem coes not crash anymore.
> 
> Note: An event ring element is 16-Byte, so the total memory usage of
> a hardware event ring is now 32KB.
> 
> Signed-off-by: Loic Poulain <loic.poulain@linaro.org>

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

Thanks,
Mani

> ---
>  drivers/bus/mhi/pci_generic.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/bus/mhi/pci_generic.c b/drivers/bus/mhi/pci_generic.c
> index 5b3a23a4..c20f59e 100644
> --- a/drivers/bus/mhi/pci_generic.c
> +++ b/drivers/bus/mhi/pci_generic.c
> @@ -129,7 +129,7 @@ struct mhi_pci_dev_info {
>  
>  #define MHI_EVENT_CONFIG_HW_DATA(ev_ring, ch_num) \
>  	{					\
> -		.num_elements = 256,		\
> +		.num_elements = 2048,		\
>  		.irq_moderation_ms = 1,		\
>  		.irq = (ev_ring) + 1,		\
>  		.priority = 1,			\
> -- 
> 2.7.4
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] bus: mhi: pci_generic: Increase num of elements in hw event ring
  2021-02-05  8:36 [PATCH] bus: mhi: pci_generic: Increase num of elements in hw event ring Loic Poulain
  2021-02-05 12:02 ` Manivannan Sadhasivam
@ 2021-02-05 12:34 ` Manivannan Sadhasivam
  2021-02-10 20:38   ` Jeffrey Hugo
  2021-03-01 19:59 ` patchwork-bot+linux-arm-msm
  2 siblings, 1 reply; 5+ messages in thread
From: Manivannan Sadhasivam @ 2021-02-05 12:34 UTC (permalink / raw)
  To: Loic Poulain; +Cc: hemantk, linux-arm-msm

On Fri, Feb 05, 2021 at 09:36:35AM +0100, Loic Poulain wrote:
> We met some sporadic modem crashes during high throughput testing, this
> has been root caused to a lack of elements in the event ring. Indeed,
> the modem is simply crashing when event ring becomes empty.
> 
> It appears that the total number event ring elements is too low given
> the performances of the modem (IPA hardware accelerator). This change
> increases the number of elements in the hardware event ring to 2048,
> which is aligned with what is defined in downstream version:
> https://source.codeaurora.org/quic/la/kernel/msm-4.14/tree/arch/arm64/boot/dts/qcom/sm8150-mhi.dtsi?h=msm-4.14#n482
> 
> With this change, modem coes not crash anymore.
> 
> Note: An event ring element is 16-Byte, so the total memory usage of
> a hardware event ring is now 32KB.
> 
> Signed-off-by: Loic Poulain <loic.poulain@linaro.org>

Applied to mhi-next!

Thanks,
Mani

> ---
>  drivers/bus/mhi/pci_generic.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/bus/mhi/pci_generic.c b/drivers/bus/mhi/pci_generic.c
> index 5b3a23a4..c20f59e 100644
> --- a/drivers/bus/mhi/pci_generic.c
> +++ b/drivers/bus/mhi/pci_generic.c
> @@ -129,7 +129,7 @@ struct mhi_pci_dev_info {
>  
>  #define MHI_EVENT_CONFIG_HW_DATA(ev_ring, ch_num) \
>  	{					\
> -		.num_elements = 256,		\
> +		.num_elements = 2048,		\
>  		.irq_moderation_ms = 1,		\
>  		.irq = (ev_ring) + 1,		\
>  		.priority = 1,			\
> -- 
> 2.7.4
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] bus: mhi: pci_generic: Increase num of elements in hw event ring
  2021-02-05 12:34 ` Manivannan Sadhasivam
@ 2021-02-10 20:38   ` Jeffrey Hugo
  0 siblings, 0 replies; 5+ messages in thread
From: Jeffrey Hugo @ 2021-02-10 20:38 UTC (permalink / raw)
  To: Manivannan Sadhasivam, Loic Poulain; +Cc: hemantk, linux-arm-msm

On 2/5/2021 5:34 AM, Manivannan Sadhasivam wrote:
> On Fri, Feb 05, 2021 at 09:36:35AM +0100, Loic Poulain wrote:
>> We met some sporadic modem crashes during high throughput testing, this
>> has been root caused to a lack of elements in the event ring. Indeed,
>> the modem is simply crashing when event ring becomes empty.
>>
>> It appears that the total number event ring elements is too low given
>> the performances of the modem (IPA hardware accelerator). This change
>> increases the number of elements in the hardware event ring to 2048,
>> which is aligned with what is defined in downstream version:
>> https://source.codeaurora.org/quic/la/kernel/msm-4.14/tree/arch/arm64/boot/dts/qcom/sm8150-mhi.dtsi?h=msm-4.14#n482
>>
>> With this change, modem coes not crash anymore.
>>
>> Note: An event ring element is 16-Byte, so the total memory usage of
>> a hardware event ring is now 32KB.
>>
>> Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
> 
> Applied to mhi-next!
> 
> Thanks,
> Mani


Probably too late, but there is a typo in the commit text.  "modem coes 
not crash" should be "modem does not crash".

-- 
Jeffrey Hugo
Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] bus: mhi: pci_generic: Increase num of elements in hw event ring
  2021-02-05  8:36 [PATCH] bus: mhi: pci_generic: Increase num of elements in hw event ring Loic Poulain
  2021-02-05 12:02 ` Manivannan Sadhasivam
  2021-02-05 12:34 ` Manivannan Sadhasivam
@ 2021-03-01 19:59 ` patchwork-bot+linux-arm-msm
  2 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+linux-arm-msm @ 2021-03-01 19:59 UTC (permalink / raw)
  To: Loic Poulain; +Cc: linux-arm-msm

Hello:

This patch was applied to qcom/linux.git (refs/heads/for-next):

On Fri,  5 Feb 2021 09:36:35 +0100 you wrote:
> We met some sporadic modem crashes during high throughput testing, this
> has been root caused to a lack of elements in the event ring. Indeed,
> the modem is simply crashing when event ring becomes empty.
> 
> It appears that the total number event ring elements is too low given
> the performances of the modem (IPA hardware accelerator). This change
> increases the number of elements in the hardware event ring to 2048,
> which is aligned with what is defined in downstream version:
> https://source.codeaurora.org/quic/la/kernel/msm-4.14/tree/arch/arm64/boot/dts/qcom/sm8150-mhi.dtsi?h=msm-4.14#n482
> 
> [...]

Here is the summary with links:
  - bus: mhi: pci_generic: Increase num of elements in hw event ring
    https://git.kernel.org/qcom/c/026c5b1ec29c

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-03-01 20:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-05  8:36 [PATCH] bus: mhi: pci_generic: Increase num of elements in hw event ring Loic Poulain
2021-02-05 12:02 ` Manivannan Sadhasivam
2021-02-05 12:34 ` Manivannan Sadhasivam
2021-02-10 20:38   ` Jeffrey Hugo
2021-03-01 19:59 ` patchwork-bot+linux-arm-msm

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).