LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc/perf: Disable trace_imc pmu
@ 2019-11-14  7:18 Madhavan Srinivasan
  2019-11-14  7:20 ` Oliver O'Halloran
  0 siblings, 1 reply; 3+ messages in thread
From: Madhavan Srinivasan @ 2019-11-14  7:18 UTC (permalink / raw)
  To: mpe; +Cc: Madhavan Srinivasan, linuxppc-dev

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.
---
 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");
-- 
2.21.0


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

* Re: [PATCH] powerpc/perf: Disable trace_imc pmu
  2019-11-14  7:18 [PATCH] powerpc/perf: Disable trace_imc pmu Madhavan Srinivasan
@ 2019-11-14  7:20 ` Oliver O'Halloran
  2019-11-14  7:31   ` maddy
  0 siblings, 1 reply; 3+ messages in thread
From: Oliver O'Halloran @ 2019-11-14  7:20 UTC (permalink / raw)
  To: Madhavan Srinivasan; +Cc: linuxppc-dev

On Thu, Nov 14, 2019 at 6:19 PM Madhavan Srinivasan
<maddy@linux.vnet.ibm.com> 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.
> ---
>  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");
> --
> 2.21.0
>

Does this need a Fixes: tag?

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

* Re: [PATCH] powerpc/perf: Disable trace_imc pmu
  2019-11-14  7:20 ` Oliver O'Halloran
@ 2019-11-14  7:31   ` maddy
  0 siblings, 0 replies; 3+ messages in thread
From: maddy @ 2019-11-14  7:31 UTC (permalink / raw)
  To: Oliver O'Halloran; +Cc: linuxppc-dev


On 11/14/19 12:50 PM, Oliver O'Halloran wrote:
> On Thu, Nov 14, 2019 at 6:19 PM Madhavan Srinivasan
> <maddy@linux.vnet.ibm.com> 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.
>> ---
>>   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");
>> --
>> 2.21.0
>>
> Does this need a Fixes: tag?
I was thinking of adding this commit as a fixes tag for fix patchset. 
But if thats
not right, i can add the fixes tag along with a request to send to 
Stable and post a v2

Maddy


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

end of thread, other threads:[~2019-11-14  7:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-14  7:18 [PATCH] powerpc/perf: Disable trace_imc pmu Madhavan Srinivasan
2019-11-14  7:20 ` Oliver O'Halloran
2019-11-14  7:31   ` maddy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox