Re: [PATCH 2/2] powerpc: tracing: don't trace hcalls on offline CPUs

From: Denis Kirjanov
Date: Thu Nov 26 2015 - 15:10:59 EST


On 11/26/15, Michael Ellerman <mpe@xxxxxxxxxxxxxx> wrote:
> On Thu, 2015-11-26 at 11:15 +0300, Denis Kirjanov wrote:
>> On 11/26/15, Michael Ellerman <mpe@xxxxxxxxxxxxxx> wrote:
>> > On Tue, 2015-11-24 at 21:23 +0300, Denis Kirjanov wrote:
>> > I can't get this to hit.
>> >
>> > I've got LOCKDEP=y, I've enabled the hcall tracepoints, and then I
>> > offline
>> > a cpu via sysfs.
>
>> I haven't tried it via sysfs. Could you share the command
>> so I give a try to reproduce.
>
> Either manually:
>
> $ echo 0 > /sys/devices/system/cpuN/online
>
> Or using:
>
> $ ppc64_cpu --cores-on=1
> and/or
> $ ppc64_cpu --smt=1

Ok, I hit the WARNING:
(the tree is dirty since I'm investigating the networking csum failure
with ipv6)
config attached.

[ 88.249496] ===============================
[ 88.249499] [ INFO: suspicious RCU usage. ]
[ 88.249502] 4.4.0-rc2-00011-gb4f8144-dirty #20 Tainted: G S
[ 88.249503] -------------------------------
[ 88.249505] ./arch/powerpc/include/asm/trace.h:77 suspicious
rcu_dereference_check() usage!
[ 88.249506]
other info that might help us debug this:

[ 88.249508]
RCU used illegally from offline CPU!
rcu_scheduler_active = 1, debug_locks = 1
[ 88.249510] no locks held by swapper/15/0.
[ 88.249511]
stack backtrace:
[ 88.249514] CPU: 15 PID: 0 Comm: swapper/15 Tainted: G S
4.4.0-rc2-00011-gb4f8144-dirty #20
[ 88.249516] Call Trace:
[ 88.249525] [c0000005b76e38f0] [c00000000089cb00]
.dump_stack+0x98/0xd4 (unreliable)
[ 88.249529] [c0000005b76e3970] [c00000000010a458]
.lockdep_rcu_suspicious+0x108/0x170
[ 88.249533] [c0000005b76e3a00] [c000000000069cd0]
.__trace_hcall_entry+0x260/0x2b0
[ 88.249536] [c0000005b76e3ab0] [c00000000006a0ac]
plpar_hcall_norets_trace+0x34/0x8c
[ 88.249539] [c0000005b76e3b20] [c000000000067704]
.icp_hv_set_cpu_priority+0x54/0xc0
[ 88.249542] [c0000005b76e3ba0] [c00000000006694c]
.xics_teardown_cpu+0x5c/0xa0
[ 88.249545] [c0000005b76e3c20] [c0000000000745fc]
.pseries_mach_cpu_die+0x6c/0x320
[ 88.249549] [c0000005b76e3cd0] [c0000000000438dc] .cpu_die+0x3c/0x60
[ 88.249552] [c0000005b76e3d40] [c000000000018398]
.arch_cpu_idle_dead+0x28/0x40
[ 88.249555] [c0000005b76e3db0] [c0000000000ffa1c]
.cpu_startup_entry+0x4fc/0x560
[ 88.249558] [c0000005b76e3ed0] [c000000000043638]
.start_secondary+0x328/0x360
[ 88.249562] [c0000005b76e3f90] [c000000000008a6c]
start_secondary_prolog+0x10/0x14

[ 88.249564] ===============================
[ 88.249564] [ INFO: suspicious RCU usage. ]
[ 88.249566] 4.4.0-rc2-00011-gb4f8144-dirty #20 Tainted: G S
[ 88.249566] -------------------------------
[ 88.249568] ./arch/powerpc/include/asm/trace.h:77 suspicious
rcu_dereference_check() usage!
[ 88.249569]
other info that might help us debug this:

[ 88.249570]
RCU used illegally from offline CPU!
rcu_scheduler_active = 1, debug_locks = 1
[ 88.249571] no locks held by swapper/15/0.
[ 88.249572]
stack backtrace:
[ 88.249574] CPU: 15 PID: 0 Comm: swapper/15 Tainted: G S
4.4.0-rc2-00011-gb4f8144-dirty #20
[ 88.249574] Call Trace:
[ 88.249578] [c0000005b76e38f0] [c00000000089cb00]
.dump_stack+0x98/0xd4 (unreliable)
[ 88.249581] [c0000005b76e3970] [c00000000010a458]
.lockdep_rcu_suspicious+0x108/0x170
[ 88.249584] [c0000005b76e3a00] [c000000000069d10]
.__trace_hcall_entry+0x2a0/0x2b0
[ 88.249587] [c0000005b76e3ab0] [c00000000006a0ac]
plpar_hcall_norets_trace+0x34/0x8c
[ 88.249590] [c0000005b76e3b20] [c000000000067704]
.icp_hv_set_cpu_priority+0x54/0xc0
[ 88.249593] [c0000005b76e3ba0] [c00000000006694c]
.xics_teardown_cpu+0x5c/0xa0
[ 88.249596] [c0000005b76e3c20] [c0000000000745fc]
.pseries_mach_cpu_die+0x6c/0x320
[ 88.249599] [c0000005b76e3cd0] [c0000000000438dc] .cpu_die+0x3c/0x60
[ 88.249602] [c0000005b76e3d40] [c000000000018398]
.arch_cpu_idle_dead+0x28/0x40
[ 88.249605] [c0000005b76e3db0] [c0000000000ffa1c]
.cpu_startup_entry+0x4fc/0x560
[ 88.249608] [c0000005b76e3ed0] [c000000000043638]
.start_secondary+0x328/0x360
[ 88.249611] [c0000005b76e3f90] [c000000000008a6c]
start_secondary_prolog+0x10/0x14

[ 88.249613] ===============================
[ 88.249613] [ INFO: suspicious RCU usage. ]
[ 88.249615] 4.4.0-rc2-00011-gb4f8144-dirty #20 Tainted: G S
[ 88.249615] -------------------------------
[ 88.249617] ./arch/powerpc/include/asm/trace.h:99 suspicious
rcu_dereference_check() usage!
[ 88.249617]
other info that might help us debug this:

[ 88.249619]
RCU used illegally from offline CPU!
rcu_scheduler_active = 1, debug_locks = 1
[ 88.249620] no locks held by swapper/15/0.
[ 88.249620]
stack backtrace:
[ 88.249622] CPU: 15 PID: 0 Comm: swapper/15 Tainted: G S
4.4.0-rc2-00011-gb4f8144-dirty #20
[ 88.249623] Call Trace:
[ 88.249626] [c0000005b76e38e0] [c00000000089cb00]
.dump_stack+0x98/0xd4 (unreliable)
[ 88.249629] [c0000005b76e3960] [c00000000010a458]
.lockdep_rcu_suspicious+0x108/0x170
[ 88.249632] [c0000005b76e39f0] [c000000000069f90]
.__trace_hcall_exit+0x270/0x2c0
[ 88.249635] [c0000005b76e3ab0] [c00000000006a0e8]
plpar_hcall_norets_trace+0x70/0x8c
[ 88.249638] [c0000005b76e3b20] [c000000000067704]
.icp_hv_set_cpu_priority+0x54/0xc0
[ 88.249641] [c0000005b76e3ba0] [c00000000006694c]
.xics_teardown_cpu+0x5c/0xa0
[ 88.249644] [c0000005b76e3c20] [c0000000000745fc]
.pseries_mach_cpu_die+0x6c/0x320
[ 88.249647] [c0000005b76e3cd0] [c0000000000438dc] .cpu_die+0x3c/0x60
[ 88.249650] [c0000005b76e3d40] [c000000000018398]
.arch_cpu_idle_dead+0x28/0x40
[ 88.249653] [c0000005b76e3db0] [c0000000000ffa1c]
.cpu_startup_entry+0x4fc/0x560
[ 88.249656] [c0000005b76e3ed0] [c000000000043638]
.start_secondary+0x328/0x360
[ 88.249659] [c0000005b76e3f90] [c000000000008a6c]
start_secondary_prolog+0x10/0x14

[ 88.249660] ===============================
[ 88.249661] [ INFO: suspicious RCU usage. ]
[ 88.249662] 4.4.0-rc2-00011-gb4f8144-dirty #20 Tainted: G S
[ 88.249663] -------------------------------
[ 88.249664] ./arch/powerpc/include/asm/trace.h:99 suspicious
rcu_dereference_check() usage!
[ 88.249665]
other info that might help us debug this:

[ 88.249666]
RCU used illegally from offline CPU!
rcu_scheduler_active = 1, debug_locks = 1
[ 88.249667] no locks held by swapper/15/0.
[ 88.249668]
stack backtrace:
[ 88.249670] CPU: 15 PID: 0 Comm: swapper/15 Tainted: G S
4.4.0-rc2-00011-gb4f8144-dirty #20
[ 88.249670] Call Trace:
[ 88.249673] [c0000005b76e38e0] [c00000000089cb00]
.dump_stack+0x98/0xd4 (unreliable)
[ 88.249677] [c0000005b76e3960] [c00000000010a458]
.lockdep_rcu_suspicious+0x108/0x170
[ 88.249680] [c0000005b76e39f0] [c000000000069fd0]
.__trace_hcall_exit+0x2b0/0x2c0
[ 88.249682] [c0000005b76e3ab0] [c00000000006a0e8]
plpar_hcall_norets_trace+0x70/0x8c
[ 88.249686] [c0000005b76e3b20] [c000000000067704]
.icp_hv_set_cpu_priority+0x54/0xc0
[ 88.249689] [c0000005b76e3ba0] [c00000000006694c]
.xics_teardown_cpu+0x5c/0xa0
[ 88.249691] [c0000005b76e3c20] [c0000000000745fc]
.pseries_mach_cpu_die+0x6c/0x320
[ 88.249694] [c0000005b76e3cd0] [c0000000000438dc] .cpu_die+0x3c/0x60
[ 88.249697] [c0000005b76e3d40] [c000000000018398]
.arch_cpu_idle_dead+0x28/0x40
[ 88.249700] [c0000005b76e3db0] [c0000000000ffa1c]
.cpu_startup_entry+0x4fc/0x560
[ 88.249703] [c0000005b76e3ed0] [c000000000043638]
.start_secondary+0x328/0x360
[ 88.249706] [c0000005b76e3f90] [c000000000008a6c]
start_secondary_prolog+0x10/0x14
ps700_1 src #


>
> Which uses sysfs.
>
> cheers
>
>

Attachment: config
Description: Binary data