All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 1/2] tracing: introduce TRACE_EVENT_FN_COND macro
@ 2015-12-14 20:18 Denis Kirjanov
  2015-12-14 20:18 ` [PATCH v3 2/2] powerpc: tracing: don't trace hcalls on offline CPUs Denis Kirjanov
  0 siblings, 1 reply; 11+ messages in thread
From: Denis Kirjanov @ 2015-12-14 20:18 UTC (permalink / raw)
  To: Steven Rostedt, Michael Ellerman
  Cc: linuxppc-dev, linux-kernel, Denis Kirjanov

TRACE_EVENT_FN can't be used in some circumstances
like invoking trace functions from offlined CPU due
to RCU usage.

This patch adds the TRACE_EVENT_FN_COND macro
to make such trace points conditional.

Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
---
 include/linux/tracepoint.h   | 4 ++++
 include/trace/define_trace.h | 6 ++++++
 include/trace/trace_events.h | 6 ++++++
 3 files changed, 16 insertions(+)

diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h
index 696a339c..45b3fcf 100644
--- a/include/linux/tracepoint.h
+++ b/include/linux/tracepoint.h
@@ -493,6 +493,10 @@ extern void syscall_unregfunc(void);
 #define TRACE_EVENT_FN(name, proto, args, struct,		\
 		assign, print, reg, unreg)			\
 	DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
+#define TRACE_EVENT_FN_COND(name, proto, args, cond, struct,		\
+		assign, print, reg, unreg)			\
+	DECLARE_TRACE_CONDITION(name, PARAMS(proto),	\
+			PARAMS(args), PARAMS(cond))
 #define TRACE_EVENT_CONDITION(name, proto, args, cond,		\
 			      struct, assign, print)		\
 	DECLARE_TRACE_CONDITION(name, PARAMS(proto),		\
diff --git a/include/trace/define_trace.h b/include/trace/define_trace.h
index 2d8639e..6e3945f 100644
--- a/include/trace/define_trace.h
+++ b/include/trace/define_trace.h
@@ -40,6 +40,11 @@
 		assign, print, reg, unreg)			\
 	DEFINE_TRACE_FN(name, reg, unreg)
 
+#undef TRACE_EVENT_FN_COND
+#define TRACE_EVENT_FN_COND(name, proto, args, cond, tstruct,		\
+		assign, print, reg, unreg)			\
+	DEFINE_TRACE_FN(name, reg, unreg)
+
 #undef DEFINE_EVENT
 #define DEFINE_EVENT(template, name, proto, args) \
 	DEFINE_TRACE(name)
@@ -93,6 +98,7 @@
 
 #undef TRACE_EVENT
 #undef TRACE_EVENT_FN
+#undef TRACE_EVENT_FN_COND
 #undef TRACE_EVENT_CONDITION
 #undef DECLARE_EVENT_CLASS
 #undef DEFINE_EVENT
diff --git a/include/trace/trace_events.h b/include/trace/trace_events.h
index de996cf..170c93b 100644
--- a/include/trace/trace_events.h
+++ b/include/trace/trace_events.h
@@ -123,6 +123,12 @@ TRACE_MAKE_SYSTEM_STR();
 	TRACE_EVENT(name, PARAMS(proto), PARAMS(args),			\
 		PARAMS(tstruct), PARAMS(assign), PARAMS(print))		\
 
+#undef TRACE_EVENT_FN_COND
+#define TRACE_EVENT_FN_COND(name, proto, args, cond, tstruct,	\
+		assign, print, reg, unreg)				\
+	TRACE_EVENT_CONDITION(name, PARAMS(proto), PARAMS(args), PARAMS(cond),		\
+		PARAMS(tstruct), PARAMS(assign), PARAMS(print))		\
+
 #undef TRACE_EVENT_FLAGS
 #define TRACE_EVENT_FLAGS(name, value)					\
 	__TRACE_EVENT_FLAGS(name, value)
-- 
2.4.0


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

* [PATCH v3 2/2] powerpc: tracing: don't trace hcalls on offline CPUs
  2015-12-14 20:18 [PATCH v3 1/2] tracing: introduce TRACE_EVENT_FN_COND macro Denis Kirjanov
@ 2015-12-14 20:18 ` Denis Kirjanov
  2015-12-23 16:12   ` Steven Rostedt
                     ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Denis Kirjanov @ 2015-12-14 20:18 UTC (permalink / raw)
  To: Steven Rostedt, Michael Ellerman
  Cc: linuxppc-dev, linux-kernel, Denis Kirjanov

./drmgr -c cpu -a -r gives the following warning:

[ 2327.035563]
RCU used illegally from offline CPU!
rcu_scheduler_active = 1, debug_locks = 1
[ 2327.035564] no locks held by swapper/12/0.
[ 2327.035565]
stack backtrace:
[ 2327.035567] CPU: 12 PID: 0 Comm: swapper/12 Tainted: G S
4.3.0-rc3-00060-g353169a #5
[ 2327.035568] Call Trace:
[ 2327.035573] [c0000001d62578e0] [c0000000008977fc] .dump_stack+0x98/0xd4 (unreliable)
[ 2327.035577] [c0000001d6257960] [c000000000109bd8] .lockdep_rcu_suspicious+0x108/0x170
[ 2327.035580] [c0000001d62579f0] [c00000000006a1d0] .__trace_hcall_exit+0x2b0/0x2c0
[ 2327.035584] [c0000001d6257ab0] [c00000000006a2e8] plpar_hcall_norets_trace+0x70/0x8c
[ 2327.035588] [c0000001d6257b20] [c000000000067a14] .icp_hv_set_cpu_priority+0x54/0xc0
[ 2327.035592] [c0000001d6257ba0] [c000000000066c5c] .xics_teardown_cpu+0x5c/0xa0
[ 2327.035595] [c0000001d6257c20] [c0000000000747ac] .pseries_mach_cpu_die+0x6c/0x320
[ 2327.035598] [c0000001d6257cd0] [c0000000000439cc] .cpu_die+0x3c/0x60
[ 2327.035602] [c0000001d6257d40] [c0000000000183d8] .arch_cpu_idle_dead+0x28/0x40
[ 2327.035606] [c0000001d6257db0] [c0000000000ff1dc] .cpu_startup_entry+0x4fc/0x560
[ 2327.035610] [c0000001d6257ed0] [c000000000043728] .start_secondary+0x328/0x360
[ 2327.035614] [c0000001d6257f90] [c000000000008a6c] start_secondary_prolog+0x10/0x14
[ 2327.035620] cpu 12 (hwid 12) Ready to die...
[ 2327.144463] cpu 13 (hwid 13) Ready to die...
[ 2327.294180] cpu 14 (hwid 14) Ready to die...
[ 2327.403599] cpu 15 (hwid 15) Ready to die...

Make the hypervisor tracepoints conditional
by using TRACE_EVENT_FN_COND

Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>

v2 changes:
 - Use raw_smp_processor_id as suggested by BenH
 since since hcalls can be called from preemptable sections

v3 changes:
 - Fix the subject line
---
 arch/powerpc/include/asm/trace.h | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/include/asm/trace.h b/arch/powerpc/include/asm/trace.h
index 8e86b48..32e36b1 100644
--- a/arch/powerpc/include/asm/trace.h
+++ b/arch/powerpc/include/asm/trace.h
@@ -57,12 +57,14 @@ DEFINE_EVENT(ppc64_interrupt_class, timer_interrupt_exit,
 extern void hcall_tracepoint_regfunc(void);
 extern void hcall_tracepoint_unregfunc(void);
 
-TRACE_EVENT_FN(hcall_entry,
+TRACE_EVENT_FN_COND(hcall_entry,
 
 	TP_PROTO(unsigned long opcode, unsigned long *args),
 
 	TP_ARGS(opcode, args),
 
+	TP_CONDITION(cpu_online(raw_smp_processor_id())),
+
 	TP_STRUCT__entry(
 		__field(unsigned long, opcode)
 	),
@@ -76,13 +78,15 @@ TRACE_EVENT_FN(hcall_entry,
 	hcall_tracepoint_regfunc, hcall_tracepoint_unregfunc
 );
 
-TRACE_EVENT_FN(hcall_exit,
+TRACE_EVENT_FN_COND(hcall_exit,
 
 	TP_PROTO(unsigned long opcode, unsigned long retval,
 		unsigned long *retbuf),
 
 	TP_ARGS(opcode, retval, retbuf),
 
+	TP_CONDITION(cpu_online(raw_smp_processor_id())),
+
 	TP_STRUCT__entry(
 		__field(unsigned long, opcode)
 		__field(unsigned long, retval)
-- 
2.4.0


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

* Re: [PATCH v3 2/2] powerpc: tracing: don't trace hcalls on offline CPUs
  2015-12-14 20:18 ` [PATCH v3 2/2] powerpc: tracing: don't trace hcalls on offline CPUs Denis Kirjanov
@ 2015-12-23 16:12   ` Steven Rostedt
  2016-01-12 10:53     ` Denis Kirjanov
  2016-01-12 11:53   ` Michael Ellerman
  2016-02-09 12:16   ` [v3,2/2] " Michael Ellerman
  2 siblings, 1 reply; 11+ messages in thread
From: Steven Rostedt @ 2015-12-23 16:12 UTC (permalink / raw)
  To: Denis Kirjanov; +Cc: Michael Ellerman, linuxppc-dev, linux-kernel

On Mon, 14 Dec 2015 23:18:06 +0300
Denis Kirjanov <kda@linux-powerpc.org> wrote:

> ./drmgr -c cpu -a -r gives the following warning:
> 
> [ 2327.035563]
> RCU used illegally from offline CPU!
> rcu_scheduler_active = 1, debug_locks = 1
> [ 2327.035564] no locks held by swapper/12/0.
> [ 2327.035565]
> stack backtrace:
> [ 2327.035567] CPU: 12 PID: 0 Comm: swapper/12 Tainted: G S
> 4.3.0-rc3-00060-g353169a #5
> [ 2327.035568] Call Trace:
> [ 2327.035573] [c0000001d62578e0] [c0000000008977fc] .dump_stack+0x98/0xd4 (unreliable)
> [ 2327.035577] [c0000001d6257960] [c000000000109bd8] .lockdep_rcu_suspicious+0x108/0x170
> [ 2327.035580] [c0000001d62579f0] [c00000000006a1d0] .__trace_hcall_exit+0x2b0/0x2c0
> [ 2327.035584] [c0000001d6257ab0] [c00000000006a2e8] plpar_hcall_norets_trace+0x70/0x8c
> [ 2327.035588] [c0000001d6257b20] [c000000000067a14] .icp_hv_set_cpu_priority+0x54/0xc0
> [ 2327.035592] [c0000001d6257ba0] [c000000000066c5c] .xics_teardown_cpu+0x5c/0xa0
> [ 2327.035595] [c0000001d6257c20] [c0000000000747ac] .pseries_mach_cpu_die+0x6c/0x320
> [ 2327.035598] [c0000001d6257cd0] [c0000000000439cc] .cpu_die+0x3c/0x60
> [ 2327.035602] [c0000001d6257d40] [c0000000000183d8] .arch_cpu_idle_dead+0x28/0x40
> [ 2327.035606] [c0000001d6257db0] [c0000000000ff1dc] .cpu_startup_entry+0x4fc/0x560
> [ 2327.035610] [c0000001d6257ed0] [c000000000043728] .start_secondary+0x328/0x360
> [ 2327.035614] [c0000001d6257f90] [c000000000008a6c] start_secondary_prolog+0x10/0x14
> [ 2327.035620] cpu 12 (hwid 12) Ready to die...
> [ 2327.144463] cpu 13 (hwid 13) Ready to die...
> [ 2327.294180] cpu 14 (hwid 14) Ready to die...
> [ 2327.403599] cpu 15 (hwid 15) Ready to die...
> 
> Make the hypervisor tracepoints conditional
> by using TRACE_EVENT_FN_COND
> 
> Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>

I applied the first patch, but I need Acks from the powerpc maintainers
to take this one.

-- Steve


> 
> v2 changes:
>  - Use raw_smp_processor_id as suggested by BenH
>  since since hcalls can be called from preemptable sections
> 
> v3 changes:
>  - Fix the subject line
> ---
>  arch/powerpc/include/asm/trace.h | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/powerpc/include/asm/trace.h b/arch/powerpc/include/asm/trace.h
> index 8e86b48..32e36b1 100644
> --- a/arch/powerpc/include/asm/trace.h
> +++ b/arch/powerpc/include/asm/trace.h
> @@ -57,12 +57,14 @@ DEFINE_EVENT(ppc64_interrupt_class, timer_interrupt_exit,
>  extern void hcall_tracepoint_regfunc(void);
>  extern void hcall_tracepoint_unregfunc(void);
>  
> -TRACE_EVENT_FN(hcall_entry,
> +TRACE_EVENT_FN_COND(hcall_entry,
>  
>  	TP_PROTO(unsigned long opcode, unsigned long *args),
>  
>  	TP_ARGS(opcode, args),
>  
> +	TP_CONDITION(cpu_online(raw_smp_processor_id())),
> +
>  	TP_STRUCT__entry(
>  		__field(unsigned long, opcode)
>  	),
> @@ -76,13 +78,15 @@ TRACE_EVENT_FN(hcall_entry,
>  	hcall_tracepoint_regfunc, hcall_tracepoint_unregfunc
>  );
>  
> -TRACE_EVENT_FN(hcall_exit,
> +TRACE_EVENT_FN_COND(hcall_exit,
>  
>  	TP_PROTO(unsigned long opcode, unsigned long retval,
>  		unsigned long *retbuf),
>  
>  	TP_ARGS(opcode, retval, retbuf),
>  
> +	TP_CONDITION(cpu_online(raw_smp_processor_id())),
> +
>  	TP_STRUCT__entry(
>  		__field(unsigned long, opcode)
>  		__field(unsigned long, retval)


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

* Re: [PATCH v3 2/2] powerpc: tracing: don't trace hcalls on offline CPUs
  2015-12-23 16:12   ` Steven Rostedt
@ 2016-01-12 10:53     ` Denis Kirjanov
  0 siblings, 0 replies; 11+ messages in thread
From: Denis Kirjanov @ 2016-01-12 10:53 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev, linux-kernel, Steven Rostedt

On 12/23/15, Steven Rostedt <rostedt@goodmis.org> wrote:
> On Mon, 14 Dec 2015 23:18:06 +0300
> Denis Kirjanov <kda@linux-powerpc.org> wrote:
>
>> ./drmgr -c cpu -a -r gives the following warning:
>>
>> [ 2327.035563]
>> RCU used illegally from offline CPU!
>> rcu_scheduler_active = 1, debug_locks = 1
>> [ 2327.035564] no locks held by swapper/12/0.
>> [ 2327.035565]
>> stack backtrace:
>> [ 2327.035567] CPU: 12 PID: 0 Comm: swapper/12 Tainted: G S
>> 4.3.0-rc3-00060-g353169a #5
>> [ 2327.035568] Call Trace:
>> [ 2327.035573] [c0000001d62578e0] [c0000000008977fc] .dump_stack+0x98/0xd4
>> (unreliable)
>> [ 2327.035577] [c0000001d6257960] [c000000000109bd8]
>> .lockdep_rcu_suspicious+0x108/0x170
>> [ 2327.035580] [c0000001d62579f0] [c00000000006a1d0]
>> .__trace_hcall_exit+0x2b0/0x2c0
>> [ 2327.035584] [c0000001d6257ab0] [c00000000006a2e8]
>> plpar_hcall_norets_trace+0x70/0x8c
>> [ 2327.035588] [c0000001d6257b20] [c000000000067a14]
>> .icp_hv_set_cpu_priority+0x54/0xc0
>> [ 2327.035592] [c0000001d6257ba0] [c000000000066c5c]
>> .xics_teardown_cpu+0x5c/0xa0
>> [ 2327.035595] [c0000001d6257c20] [c0000000000747ac]
>> .pseries_mach_cpu_die+0x6c/0x320
>> [ 2327.035598] [c0000001d6257cd0] [c0000000000439cc] .cpu_die+0x3c/0x60
>> [ 2327.035602] [c0000001d6257d40] [c0000000000183d8]
>> .arch_cpu_idle_dead+0x28/0x40
>> [ 2327.035606] [c0000001d6257db0] [c0000000000ff1dc]
>> .cpu_startup_entry+0x4fc/0x560
>> [ 2327.035610] [c0000001d6257ed0] [c000000000043728]
>> .start_secondary+0x328/0x360
>> [ 2327.035614] [c0000001d6257f90] [c000000000008a6c]
>> start_secondary_prolog+0x10/0x14
>> [ 2327.035620] cpu 12 (hwid 12) Ready to die...
>> [ 2327.144463] cpu 13 (hwid 13) Ready to die...
>> [ 2327.294180] cpu 14 (hwid 14) Ready to die...
>> [ 2327.403599] cpu 15 (hwid 15) Ready to die...
>>
>> Make the hypervisor tracepoints conditional
>> by using TRACE_EVENT_FN_COND
>>
>> Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
>
> I applied the first patch, but I need Acks from the powerpc maintainers
> to take this one.
>

Hi Michael,

Could you please put your ack to the second patch.

Thanks!

> -- Steve
>
>
>>
>> v2 changes:
>>  - Use raw_smp_processor_id as suggested by BenH
>>  since since hcalls can be called from preemptable sections
>>
>> v3 changes:
>>  - Fix the subject line
>> ---
>>  arch/powerpc/include/asm/trace.h | 8 ++++++--
>>  1 file changed, 6 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/powerpc/include/asm/trace.h
>> b/arch/powerpc/include/asm/trace.h
>> index 8e86b48..32e36b1 100644
>> --- a/arch/powerpc/include/asm/trace.h
>> +++ b/arch/powerpc/include/asm/trace.h
>> @@ -57,12 +57,14 @@ DEFINE_EVENT(ppc64_interrupt_class,
>> timer_interrupt_exit,
>>  extern void hcall_tracepoint_regfunc(void);
>>  extern void hcall_tracepoint_unregfunc(void);
>>
>> -TRACE_EVENT_FN(hcall_entry,
>> +TRACE_EVENT_FN_COND(hcall_entry,
>>
>>  	TP_PROTO(unsigned long opcode, unsigned long *args),
>>
>>  	TP_ARGS(opcode, args),
>>
>> +	TP_CONDITION(cpu_online(raw_smp_processor_id())),
>> +
>>  	TP_STRUCT__entry(
>>  		__field(unsigned long, opcode)
>>  	),
>> @@ -76,13 +78,15 @@ TRACE_EVENT_FN(hcall_entry,
>>  	hcall_tracepoint_regfunc, hcall_tracepoint_unregfunc
>>  );
>>
>> -TRACE_EVENT_FN(hcall_exit,
>> +TRACE_EVENT_FN_COND(hcall_exit,
>>
>>  	TP_PROTO(unsigned long opcode, unsigned long retval,
>>  		unsigned long *retbuf),
>>
>>  	TP_ARGS(opcode, retval, retbuf),
>>
>> +	TP_CONDITION(cpu_online(raw_smp_processor_id())),
>> +
>>  	TP_STRUCT__entry(
>>  		__field(unsigned long, opcode)
>>  		__field(unsigned long, retval)
>
>

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

* Re: [PATCH v3 2/2] powerpc: tracing: don't trace hcalls on offline CPUs
  2015-12-14 20:18 ` [PATCH v3 2/2] powerpc: tracing: don't trace hcalls on offline CPUs Denis Kirjanov
  2015-12-23 16:12   ` Steven Rostedt
@ 2016-01-12 11:53   ` Michael Ellerman
  2016-01-19 11:53     ` Denis Kirjanov
  2016-02-09 12:16   ` [v3,2/2] " Michael Ellerman
  2 siblings, 1 reply; 11+ messages in thread
From: Michael Ellerman @ 2016-01-12 11:53 UTC (permalink / raw)
  To: Denis Kirjanov, Steven Rostedt; +Cc: linuxppc-dev, linux-kernel

On Mon, 2015-12-14 at 23:18 +0300, Denis Kirjanov wrote:

> ./drmgr -c cpu -a -r gives the following warning:
> 
> [ 2327.035563]
> RCU used illegally from offline CPU!
> rcu_scheduler_active = 1, debug_locks = 1
> [ 2327.035564] no locks held by swapper/12/0.
> [ 2327.035565]
> stack backtrace:
> [ 2327.035567] CPU: 12 PID: 0 Comm: swapper/12 Tainted: G S
> 4.3.0-rc3-00060-g353169a #5
> [ 2327.035568] Call Trace:
> [ 2327.035573] [c0000001d62578e0] [c0000000008977fc] .dump_stack+0x98/0xd4 (unreliable)
> [ 2327.035577] [c0000001d6257960] [c000000000109bd8] .lockdep_rcu_suspicious+0x108/0x170
> [ 2327.035580] [c0000001d62579f0] [c00000000006a1d0] .__trace_hcall_exit+0x2b0/0x2c0
> [ 2327.035584] [c0000001d6257ab0] [c00000000006a2e8] plpar_hcall_norets_trace+0x70/0x8c
> [ 2327.035588] [c0000001d6257b20] [c000000000067a14] .icp_hv_set_cpu_priority+0x54/0xc0
> [ 2327.035592] [c0000001d6257ba0] [c000000000066c5c] .xics_teardown_cpu+0x5c/0xa0
> [ 2327.035595] [c0000001d6257c20] [c0000000000747ac] .pseries_mach_cpu_die+0x6c/0x320
> [ 2327.035598] [c0000001d6257cd0] [c0000000000439cc] .cpu_die+0x3c/0x60
> [ 2327.035602] [c0000001d6257d40] [c0000000000183d8] .arch_cpu_idle_dead+0x28/0x40
> [ 2327.035606] [c0000001d6257db0] [c0000000000ff1dc] .cpu_startup_entry+0x4fc/0x560
> [ 2327.035610] [c0000001d6257ed0] [c000000000043728] .start_secondary+0x328/0x360
> [ 2327.035614] [c0000001d6257f90] [c000000000008a6c] start_secondary_prolog+0x10/0x14
> [ 2327.035620] cpu 12 (hwid 12) Ready to die...
> [ 2327.144463] cpu 13 (hwid 13) Ready to die...
> [ 2327.294180] cpu 14 (hwid 14) Ready to die...
> [ 2327.403599] cpu 15 (hwid 15) Ready to die...
> 
> Make the hypervisor tracepoints conditional
> by using TRACE_EVENT_FN_COND
> 
> Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>

Acked-by: Michael Ellerman <mpe@ellerman.id.au>

cheers

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

* Re: [PATCH v3 2/2] powerpc: tracing: don't trace hcalls on offline CPUs
  2016-01-12 11:53   ` Michael Ellerman
@ 2016-01-19 11:53     ` Denis Kirjanov
  2016-02-05 11:20       ` Denis Kirjanov
  0 siblings, 1 reply; 11+ messages in thread
From: Denis Kirjanov @ 2016-01-19 11:53 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: linuxppc-dev, linux-kernel, Michael Ellerman

On 1/12/16, Michael Ellerman <mpe@ellerman.id.au> wrote:
> On Mon, 2015-12-14 at 23:18 +0300, Denis Kirjanov wrote:
>
>> ./drmgr -c cpu -a -r gives the following warning:
>>
>> [ 2327.035563]
>> RCU used illegally from offline CPU!
>> rcu_scheduler_active = 1, debug_locks = 1
>> [ 2327.035564] no locks held by swapper/12/0.
>> [ 2327.035565]
>> stack backtrace:
>> [ 2327.035567] CPU: 12 PID: 0 Comm: swapper/12 Tainted: G S
>> 4.3.0-rc3-00060-g353169a #5
>> [ 2327.035568] Call Trace:
>> [ 2327.035573] [c0000001d62578e0] [c0000000008977fc] .dump_stack+0x98/0xd4
>> (unreliable)
>> [ 2327.035577] [c0000001d6257960] [c000000000109bd8]
>> .lockdep_rcu_suspicious+0x108/0x170
>> [ 2327.035580] [c0000001d62579f0] [c00000000006a1d0]
>> .__trace_hcall_exit+0x2b0/0x2c0
>> [ 2327.035584] [c0000001d6257ab0] [c00000000006a2e8]
>> plpar_hcall_norets_trace+0x70/0x8c
>> [ 2327.035588] [c0000001d6257b20] [c000000000067a14]
>> .icp_hv_set_cpu_priority+0x54/0xc0
>> [ 2327.035592] [c0000001d6257ba0] [c000000000066c5c]
>> .xics_teardown_cpu+0x5c/0xa0
>> [ 2327.035595] [c0000001d6257c20] [c0000000000747ac]
>> .pseries_mach_cpu_die+0x6c/0x320
>> [ 2327.035598] [c0000001d6257cd0] [c0000000000439cc] .cpu_die+0x3c/0x60
>> [ 2327.035602] [c0000001d6257d40] [c0000000000183d8]
>> .arch_cpu_idle_dead+0x28/0x40
>> [ 2327.035606] [c0000001d6257db0] [c0000000000ff1dc]
>> .cpu_startup_entry+0x4fc/0x560
>> [ 2327.035610] [c0000001d6257ed0] [c000000000043728]
>> .start_secondary+0x328/0x360
>> [ 2327.035614] [c0000001d6257f90] [c000000000008a6c]
>> start_secondary_prolog+0x10/0x14
>> [ 2327.035620] cpu 12 (hwid 12) Ready to die...
>> [ 2327.144463] cpu 13 (hwid 13) Ready to die...
>> [ 2327.294180] cpu 14 (hwid 14) Ready to die...
>> [ 2327.403599] cpu 15 (hwid 15) Ready to die...
>>
>> Make the hypervisor tracepoints conditional
>> by using TRACE_EVENT_FN_COND
>>
>> Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>

Hi Steven,

please apply with Michael's acked-by tag.

Thanks!
>
> Acked-by: Michael Ellerman <mpe@ellerman.id.au>
>
> cheers
>
>

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

* Re: [PATCH v3 2/2] powerpc: tracing: don't trace hcalls on offline CPUs
  2016-01-19 11:53     ` Denis Kirjanov
@ 2016-02-05 11:20       ` Denis Kirjanov
  2016-02-05 14:36         ` Steven Rostedt
  0 siblings, 1 reply; 11+ messages in thread
From: Denis Kirjanov @ 2016-02-05 11:20 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: linuxppc-dev, linux-kernel, Michael Ellerman

On 1/19/16, Denis Kirjanov <kda@linux-powerpc.org> wrote:
> On 1/12/16, Michael Ellerman <mpe@ellerman.id.au> wrote:
>> On Mon, 2015-12-14 at 23:18 +0300, Denis Kirjanov wrote:
>>
>>> ./drmgr -c cpu -a -r gives the following warning:
>>>
>>> [ 2327.035563]
>>> RCU used illegally from offline CPU!
>>> rcu_scheduler_active = 1, debug_locks = 1
>>> [ 2327.035564] no locks held by swapper/12/0.
>>> [ 2327.035565]
>>> stack backtrace:
>>> [ 2327.035567] CPU: 12 PID: 0 Comm: swapper/12 Tainted: G S
>>> 4.3.0-rc3-00060-g353169a #5
>>> [ 2327.035568] Call Trace:
>>> [ 2327.035573] [c0000001d62578e0] [c0000000008977fc]
>>> .dump_stack+0x98/0xd4
>>> (unreliable)
>>> [ 2327.035577] [c0000001d6257960] [c000000000109bd8]
>>> .lockdep_rcu_suspicious+0x108/0x170
>>> [ 2327.035580] [c0000001d62579f0] [c00000000006a1d0]
>>> .__trace_hcall_exit+0x2b0/0x2c0
>>> [ 2327.035584] [c0000001d6257ab0] [c00000000006a2e8]
>>> plpar_hcall_norets_trace+0x70/0x8c
>>> [ 2327.035588] [c0000001d6257b20] [c000000000067a14]
>>> .icp_hv_set_cpu_priority+0x54/0xc0
>>> [ 2327.035592] [c0000001d6257ba0] [c000000000066c5c]
>>> .xics_teardown_cpu+0x5c/0xa0
>>> [ 2327.035595] [c0000001d6257c20] [c0000000000747ac]
>>> .pseries_mach_cpu_die+0x6c/0x320
>>> [ 2327.035598] [c0000001d6257cd0] [c0000000000439cc] .cpu_die+0x3c/0x60
>>> [ 2327.035602] [c0000001d6257d40] [c0000000000183d8]
>>> .arch_cpu_idle_dead+0x28/0x40
>>> [ 2327.035606] [c0000001d6257db0] [c0000000000ff1dc]
>>> .cpu_startup_entry+0x4fc/0x560
>>> [ 2327.035610] [c0000001d6257ed0] [c000000000043728]
>>> .start_secondary+0x328/0x360
>>> [ 2327.035614] [c0000001d6257f90] [c000000000008a6c]
>>> start_secondary_prolog+0x10/0x14
>>> [ 2327.035620] cpu 12 (hwid 12) Ready to die...
>>> [ 2327.144463] cpu 13 (hwid 13) Ready to die...
>>> [ 2327.294180] cpu 14 (hwid 14) Ready to die...
>>> [ 2327.403599] cpu 15 (hwid 15) Ready to die...
>>>
>>> Make the hypervisor tracepoints conditional
>>> by using TRACE_EVENT_FN_COND
>>>
>>> Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
>
> Hi Steven,
>
> please apply with Michael's acked-by tag.

ping

>
> Thanks!
>>
>> Acked-by: Michael Ellerman <mpe@ellerman.id.au>
>>
>> cheers
>>
>>
>

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

* Re: [PATCH v3 2/2] powerpc: tracing: don't trace hcalls on offline CPUs
  2016-02-05 11:20       ` Denis Kirjanov
@ 2016-02-05 14:36         ` Steven Rostedt
  2016-02-05 14:48           ` Denis Kirjanov
  2016-02-09  9:24           ` Michael Ellerman
  0 siblings, 2 replies; 11+ messages in thread
From: Steven Rostedt @ 2016-02-05 14:36 UTC (permalink / raw)
  To: Denis Kirjanov; +Cc: linuxppc-dev, linux-kernel, Michael Ellerman

On Fri, 5 Feb 2016 14:20:17 +0300
Denis Kirjanov <kda@linux-powerpc.org> wrote:

> >>> Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>  
> >
> > Hi Steven,
> >
> > please apply with Michael's acked-by tag.  
> 
> ping
> 

Actually, can you take this through the ppc tree? The
TRACE_EVENT_FN_COND is already in mainline.

You can add my:

Acked-by: Steven Rostedt <rostedt@goodmis.org>

-- Steve

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

* Re: [PATCH v3 2/2] powerpc: tracing: don't trace hcalls on offline CPUs
  2016-02-05 14:36         ` Steven Rostedt
@ 2016-02-05 14:48           ` Denis Kirjanov
  2016-02-09  9:24           ` Michael Ellerman
  1 sibling, 0 replies; 11+ messages in thread
From: Denis Kirjanov @ 2016-02-05 14:48 UTC (permalink / raw)
  To: Steven Rostedt, Michael Ellerman; +Cc: linuxppc-dev, linux-kernel

On 2/5/16, Steven Rostedt <rostedt@goodmis.org> wrote:
> On Fri, 5 Feb 2016 14:20:17 +0300
> Denis Kirjanov <kda@linux-powerpc.org> wrote:
>
>> >>> Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
>> >
>> > Hi Steven,
>> >
>> > please apply with Michael's acked-by tag.
>>
>> ping
>>
>
> Actually, can you take this through the ppc tree? The
> TRACE_EVENT_FN_COND is already in mainline.
>
> You can add my:
>
> Acked-by: Steven Rostedt <rostedt@goodmis.org>

Hey Michael,

Please apply the patch.

Thanks!

>
> -- Steve
>

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

* Re: [PATCH v3 2/2] powerpc: tracing: don't trace hcalls on offline CPUs
  2016-02-05 14:36         ` Steven Rostedt
  2016-02-05 14:48           ` Denis Kirjanov
@ 2016-02-09  9:24           ` Michael Ellerman
  1 sibling, 0 replies; 11+ messages in thread
From: Michael Ellerman @ 2016-02-09  9:24 UTC (permalink / raw)
  To: Steven Rostedt, Denis Kirjanov; +Cc: linuxppc-dev, linux-kernel

On Fri, 2016-02-05 at 09:36 -0500, Steven Rostedt wrote:
> On Fri, 5 Feb 2016 14:20:17 +0300
> Denis Kirjanov <kda@linux-powerpc.org> wrote:
> > > > > Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
> > >
> > > Hi Steven,
> > >
> > > please apply with Michael's acked-by tag.
> >
> > ping
>
> Actually, can you take this through the ppc tree? The
> TRACE_EVENT_FN_COND is already in mainline.
>
> You can add my:
>
> Acked-by: Steven Rostedt <rostedt@goodmis.org>

Thanks, will do.

I tidied up the change log a bit:

    powerpc/pseries: Don't trace hcalls on offline CPUs

    If a cpu is hotplugged while the hcall trace points are active, it's
    possible to hit a warning from RCU due to the trace points calling into
    RCU from an offline cpu, eg:

      RCU used illegally from offline CPU!
      rcu_scheduler_active = 1, debug_locks = 1

    Make the hypervisor tracepoints conditional by using
    TRACE_EVENT_FN_COND.

    Acked-by: Steven Rostedt <rostedt@goodmis.org>
    Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>


cheers

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

* Re: [v3,2/2] powerpc: tracing: don't trace hcalls on offline CPUs
  2015-12-14 20:18 ` [PATCH v3 2/2] powerpc: tracing: don't trace hcalls on offline CPUs Denis Kirjanov
  2015-12-23 16:12   ` Steven Rostedt
  2016-01-12 11:53   ` Michael Ellerman
@ 2016-02-09 12:16   ` Michael Ellerman
  2 siblings, 0 replies; 11+ messages in thread
From: Michael Ellerman @ 2016-02-09 12:16 UTC (permalink / raw)
  To: Denis Kirjanov, Steven Rostedt; +Cc: linuxppc-dev, Denis Kirjanov, linux-kernel

On Mon, 2015-14-12 at 20:18:06 UTC, Denis Kirjanov wrote:
> ./drmgr -c cpu -a -r gives the following warning:
> 
> ...

Applied to powerpc fixes, thanks.

https://git.kernel.org/powerpc/c/168a20bb35122539682671d15c

cheers

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

end of thread, other threads:[~2016-02-09 12:16 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-14 20:18 [PATCH v3 1/2] tracing: introduce TRACE_EVENT_FN_COND macro Denis Kirjanov
2015-12-14 20:18 ` [PATCH v3 2/2] powerpc: tracing: don't trace hcalls on offline CPUs Denis Kirjanov
2015-12-23 16:12   ` Steven Rostedt
2016-01-12 10:53     ` Denis Kirjanov
2016-01-12 11:53   ` Michael Ellerman
2016-01-19 11:53     ` Denis Kirjanov
2016-02-05 11:20       ` Denis Kirjanov
2016-02-05 14:36         ` Steven Rostedt
2016-02-05 14:48           ` Denis Kirjanov
2016-02-09  9:24           ` Michael Ellerman
2016-02-09 12:16   ` [v3,2/2] " Michael Ellerman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.