diff mbox series

[v2] powerpc/perf: Disable trace_imc pmu

Message ID 20191118034452.9939-1-maddy@linux.vnet.ibm.com (mailing list archive)
State Accepted
Headers show
Series [v2] powerpc/perf: Disable trace_imc pmu | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success Successfully applied on branch powerpc/merge (3b4852888d3f7e0cde65b29af9c518f4019e145f)
snowpatch_ozlabs/build-ppc64le success Build succeeded
snowpatch_ozlabs/build-ppc64be success Build succeeded
snowpatch_ozlabs/build-ppc64e success Build succeeded
snowpatch_ozlabs/build-pmac32 success Build succeeded
snowpatch_ozlabs/checkpatch success total: 0 errors, 0 warnings, 0 checks, 13 lines checked
snowpatch_ozlabs/needsstable warning Please consider tagging this patch for stable!

Commit Message

maddy Nov. 18, 2019, 3:44 a.m. UTC
When a root user or a user with CAP_SYS_ADMIN
privilege use trace_imc performance monitoring
unit events, to monitor application or KVM threads,
may result in a checkstop (System crash). Reason
being frequent switch of the "trace/accumulation"
mode of In-Memory Collection hardware.
This patch disables trace_imc pmu unit, but will
be re-enabled at a later stage with a fix patchset.

Fixes: 012ae244845f1 ('powerpc/perf: Trace imc PMU functions') 
Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
---
Changelog v1:
- Added fixes and signed-off by.
 arch/powerpc/platforms/powernv/opal-imc.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

Hariharan T S Nov. 22, 2019, 8:03 a.m. UTC | #1
On 11/18/19 9:14 AM, Madhavan Srinivasan wrote:
> When a root user or a user with CAP_SYS_ADMIN
> privilege use trace_imc performance monitoring
> unit events, to monitor application or KVM threads,
> may result in a checkstop (System crash). Reason
> being frequent switch of the "trace/accumulation"
> mode of In-Memory Collection hardware.
> This patch disables trace_imc pmu unit, but will
> be re-enabled at a later stage with a fix patchset.
> 
> Fixes: 012ae244845f1 ('powerpc/perf: Trace imc PMU functions')
> Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>

Tested-by: Hariharan T.S. <hari@linux.ibm.com>
> ---
> Changelog v1:
> - Added fixes and signed-off by.
>   arch/powerpc/platforms/powernv/opal-imc.c | 7 ++++++-
>   1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/platforms/powernv/opal-imc.c b/arch/powerpc/platforms/powernv/opal-imc.c
> index e04b20625cb9..5790f078771f 100644
> --- a/arch/powerpc/platforms/powernv/opal-imc.c
> +++ b/arch/powerpc/platforms/powernv/opal-imc.c
> @@ -285,7 +285,12 @@ static int opal_imc_counters_probe(struct platform_device *pdev)
>   			domain = IMC_DOMAIN_THREAD;
>   			break;
>   		case IMC_TYPE_TRACE:
> -			domain = IMC_DOMAIN_TRACE;
> +			/* Using trace_imc events to monitor
> +			 * application or KVM thread performances
> +			 * may result in a checkstop (system crash).
> +			 * So disabling it for now.
> +			 */
> +			domain = -1;
>   			break;
>   		default:
>   			pr_warn("IMC Unknown Device type \n");
>
Michael Ellerman Dec. 9, 2019, 5:45 a.m. UTC | #2
On Mon, 2019-11-18 at 03:44:52 UTC, Madhavan Srinivasan wrote:
> When a root user or a user with CAP_SYS_ADMIN
> privilege use trace_imc performance monitoring
> unit events, to monitor application or KVM threads,
> may result in a checkstop (System crash). Reason
> being frequent switch of the "trace/accumulation"
> mode of In-Memory Collection hardware.
> This patch disables trace_imc pmu unit, but will
> be re-enabled at a later stage with a fix patchset.
> 
> Fixes: 012ae244845f1 ('powerpc/perf: Trace imc PMU functions') 
> Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>

Applied to powerpc fixes, thanks.

https://git.kernel.org/powerpc/c/249fad734a25889a4f23ed014d43634af6798063

cheers
diff mbox series

Patch

diff --git a/arch/powerpc/platforms/powernv/opal-imc.c b/arch/powerpc/platforms/powernv/opal-imc.c
index e04b20625cb9..5790f078771f 100644
--- a/arch/powerpc/platforms/powernv/opal-imc.c
+++ b/arch/powerpc/platforms/powernv/opal-imc.c
@@ -285,7 +285,12 @@  static int opal_imc_counters_probe(struct platform_device *pdev)
 			domain = IMC_DOMAIN_THREAD;
 			break;
 		case IMC_TYPE_TRACE:
-			domain = IMC_DOMAIN_TRACE;
+			/* Using trace_imc events to monitor
+			 * application or KVM thread performances
+			 * may result in a checkstop (system crash).
+			 * So disabling it for now.
+			 */
+			domain = -1;
 			break;
 		default:
 			pr_warn("IMC Unknown Device type \n");