diff mbox series

[PATCHv13,9/9] soc: qcom: geni: Disable MMIO tracing for GENI SE

Message ID 3b2fb1e02f7a9836b2388b9f2ce2184c5a0cd444.1651149615.git.quic_saipraka@quicinc.com (mailing list archive)
State New, archived
Headers show
Series lib/rwmmio/arm64: Add support to trace register reads/writes | expand

Commit Message

Sai Prakash Ranjan April 28, 2022, 12:44 p.m. UTC
Disable MMIO tracing for geni serial engine driver as it is a
high frequency operation with many register reads/writes and
not very useful to log all MMIO traces and prevent excessive
logging.

Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Sai Prakash Ranjan <quic_saipraka@quicinc.com>
---
 drivers/soc/qcom/qcom-geni-se.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Steven Rostedt April 28, 2022, 1:29 p.m. UTC | #1
On Thu, 28 Apr 2022 18:14:12 +0530
Sai Prakash Ranjan <quic_saipraka@quicinc.com> wrote:

> Disable MMIO tracing for geni serial engine driver as it is a
> high frequency operation with many register reads/writes and
> not very useful to log all MMIO traces and prevent excessive
> logging.

This states what it does but does not really state why. Are you using MMIO
tracing in other locations and this is causing too much noise?

What is the real issue. Just saying "excessive logging" is not sufficient.
That would be a reason to disable function tracing ;-)

-- Steve


> 
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Signed-off-by: Sai Prakash Ranjan <quic_saipraka@quicinc.com>
> ---
>  drivers/soc/qcom/qcom-geni-se.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/soc/qcom/qcom-geni-se.c b/drivers/soc/qcom/qcom-geni-se.c
> index 28a8c0dda66c..a0ceeede450f 100644
> --- a/drivers/soc/qcom/qcom-geni-se.c
> +++ b/drivers/soc/qcom/qcom-geni-se.c
> @@ -1,6 +1,9 @@
>  // SPDX-License-Identifier: GPL-2.0
>  // Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
>  
> +/* Disable MMIO tracing to prevent excessive logging of unwanted MMIO traces */
> +#define __DISABLE_TRACE_MMIO__
> +
>  #include <linux/acpi.h>
>  #include <linux/clk.h>
>  #include <linux/slab.h>
Sai Prakash Ranjan April 29, 2022, 1:29 p.m. UTC | #2
Hi Steve,

On 4/28/2022 6:59 PM, Steven Rostedt wrote:
> On Thu, 28 Apr 2022 18:14:12 +0530
> Sai Prakash Ranjan <quic_saipraka@quicinc.com> wrote:
>
>> Disable MMIO tracing for geni serial engine driver as it is a
>> high frequency operation with many register reads/writes and
>> not very useful to log all MMIO traces and prevent excessive
>> logging.
> This states what it does but does not really state why. Are you using MMIO
> tracing in other locations and this is causing too much noise?
> What is the real issue. Just saying "excessive logging" is not sufficient.
> That would be a reason to disable function tracing ;-)
>
> -- Steve
>

Disabling MMIO trace is what it does and why it does is to prevent excessive logging.
I will add more details on why preventing excessive logging is required here.

It is quite known that any access over serial console would involve a lot of TX and RX
register accesses (and few others), so these MMIO read/write trace events in these
drivers cause a lot of unwanted noise because of the high frequency of such operations
and is not very useful tracing these events for such driver. And we want to enable these
trace events on development devices(maybe not production devices) where performance
also really matters since we want to debug and track any crashes with such register
accesses on these devices and not just something which runs with every debug option
out there (meaning we enable this MMIO tracing with almost on par production kernels).
And these traces of such driver add additional overhead both in terms of memory and
CPU cycles.

And also one more reason is that if we try to display trace buffer containing these register
trace events onto serial console, then it would also involve register accesses from these
drivers which would lead to recursive tracing.

I will update the commit text adding these details and since we got your attention, can you
also please look at patch 5 [1] which was updated based on your previous review comments.
If you could review/ack them, then Arnd can take this series into his tree once I post the next
version with these updated commit text.

[1] https://lore.kernel.org/lkml/9827bae40f6f319f294d06859c9e3c7442f067f2.1651149615.git.quic_saipraka@quicinc.com/

Thanks,
Sai

>> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
>> Signed-off-by: Sai Prakash Ranjan <quic_saipraka@quicinc.com>
>> ---
>>   drivers/soc/qcom/qcom-geni-se.c | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/soc/qcom/qcom-geni-se.c b/drivers/soc/qcom/qcom-geni-se.c
>> index 28a8c0dda66c..a0ceeede450f 100644
>> --- a/drivers/soc/qcom/qcom-geni-se.c
>> +++ b/drivers/soc/qcom/qcom-geni-se.c
>> @@ -1,6 +1,9 @@
>>   // SPDX-License-Identifier: GPL-2.0
>>   // Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
>>   
>> +/* Disable MMIO tracing to prevent excessive logging of unwanted MMIO traces */
>> +#define __DISABLE_TRACE_MMIO__
>> +
>>   #include <linux/acpi.h>
>>   #include <linux/clk.h>
>>   #include <linux/slab.h>
diff mbox series

Patch

diff --git a/drivers/soc/qcom/qcom-geni-se.c b/drivers/soc/qcom/qcom-geni-se.c
index 28a8c0dda66c..a0ceeede450f 100644
--- a/drivers/soc/qcom/qcom-geni-se.c
+++ b/drivers/soc/qcom/qcom-geni-se.c
@@ -1,6 +1,9 @@ 
 // SPDX-License-Identifier: GPL-2.0
 // Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
 
+/* Disable MMIO tracing to prevent excessive logging of unwanted MMIO traces */
+#define __DISABLE_TRACE_MMIO__
+
 #include <linux/acpi.h>
 #include <linux/clk.h>
 #include <linux/slab.h>