linux_dsm_epyc7002/arch/arc/kernel
Vineet Gupta 2e22502c08 ARC: dw2 unwind: Remove falllback linear search thru FDE entries
Fixes STAR 9000953410: "perf callgraph profiling causing RCU stalls"

| perf record -g -c 15000 -e cycles /sbin/hackbench
|
| INFO: rcu_preempt self-detected stall on CPU
| 1: (1 GPs behind) idle=609/140000000000002/0 softirq=2914/2915 fqs=603
| Task dump for CPU 1:

in-kernel dwarf unwinder has a fast binary lookup and a fallback linear
search (which iterates thru each of ~11K entries) thus takes 2 orders of
magnitude longer (~3 million cycles vs. 2000). Routines written in hand
assembler lack dwarf info (as we don't support assembler CFI pseudo-ops
yet) fail the unwinder binary lookup, hit linear search, failing
nevertheless in the end.

However the linear search is pointless as binary lookup tables are created
from it in first place. It is impossible to have binary lookup fail while
succeed the linear search. It is pure waste of cycles thus removed by
this patch.

This manifested as RCU stalls / NMI watchdog splat when running
hackbench under perf with callgraph profiling. The triggering condition
was perf counter overflowing in routine lacking dwarf info (like memset)
leading to patheic 3 million cycle unwinder slow path and by the time it
returned new interrupts were already pending (Timer, IPI) and taken
rightaway. The original memset didn't make forward progress, system kept
accruing more interrupts and more unwinder delayes in a vicious feedback
loop, ultimately triggering the NMI diagnostic.

Cc: stable@vger.kernel.org
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
2015-11-23 21:36:49 +05:30
..
.gitignore ARC: Add some .gitignore entries 2013-08-26 09:40:24 +05:30
arc_hostlink.c ARC: Hostlink Pseudo-Driver for Metaware Debugger 2013-02-15 23:16:10 +05:30
arcksyms.c ARC: Build system: Makefiles, Kconfig, Linker script 2013-02-11 20:00:25 +05:30
asm-offsets.c ARCv2: [vdk] dts files and defconfig for HS38 VDK 2015-06-25 06:00:21 +05:30
clk.c ARC: fix typo with clock speed 2013-05-07 13:43:54 +05:30
ctx_sw_asm.S ARC: remove SYNC from __switch_to() 2015-11-17 22:05:30 +05:30
ctx_sw.c ARC: remove SYNC from __switch_to() 2015-11-17 22:05:30 +05:30
devtree.c ARCv2: [axs103] Support ARC SDP FPGA platform for HS38x cores 2015-06-25 06:00:20 +05:30
disasm.c ARC: rename kconfig option for unaligned emulation 2014-10-13 14:46:15 +05:30
entry-arcv2.S ARC: [arcompact] Handle bus error from userspace as Interrupt not exception 2015-11-14 13:12:20 +05:30
entry-compact.S ARC: [arcompact] Handle bus error from userspace as Interrupt not exception 2015-11-14 13:12:20 +05:30
entry.S ARC: [arcompact] Handle bus error from userspace as Interrupt not exception 2015-11-14 13:12:20 +05:30
fpu.c ARC: Process-creation/scheduling/idle-loop 2013-02-11 20:00:38 +05:30
head.S ARC: boot: Non Master cpus only need to call EARLY_CPU_SETUP once 2015-10-28 16:13:42 +05:30
intc-arcv2.c arc:irqchip: prepare for drivers/irqchip/irqchip.h removal 2015-07-09 17:36:32 +05:30
intc-compact.c ARC: smp: irqchip: handle IPI as percpu irq like timer 2015-10-28 16:13:39 +05:30
irq.c ARC: smp: Introduce smp hook @init_irq_cpu called for all cores 2015-10-28 16:13:41 +05:30
kgdb.c ARC: kgdb: generic kgdb_arch_pc() suffices 2014-10-22 16:14:04 -06:00
kprobes.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2013-11-15 16:47:22 -08:00
Makefile ARCv2: SMP: Support ARConnect (MCIP) for Inter-Core-Interrupts et al 2015-06-22 14:06:56 +05:30
mcip.c ARCv2: smp: [plat-*]: No need to explicitly call mcip_init_smp() 2015-10-28 16:13:41 +05:30
module.c ARC: Fix coding style issues 2013-04-09 12:21:14 +05:30
perf_event.c ARCv2: perf: Finally introduce HS perf unit 2015-08-27 14:59:07 +05:30
process.c ARC: Abstract out ISA specific SLEEP args 2015-11-16 14:17:02 +05:30
ptrace.c ARCv2: Support for ARCv2 ISA and HS38x cores 2015-06-22 14:06:55 +05:30
reset.c arc: export symbol for pm_power_off in reset.c 2013-11-06 10:41:44 +05:30
setup.c ARC: smp: Introduce smp hook @init_early_smp for Master core 2015-10-28 16:13:40 +05:30
signal.c ARCv2: Support for ARCv2 ISA and HS38x cores 2015-06-22 14:06:55 +05:30
smp.c ARC: smp: Introduce smp hook @init_irq_cpu called for all cores 2015-10-28 16:13:41 +05:30
stacktrace.c ARC: stack unwinder to bail if PC is not kernel mode 2015-06-19 18:09:29 +05:30
sys.c ARC: ABIv3: fork/vfork wrappers not needed in "no-legacy-syscall" ABI 2013-03-11 19:01:10 +05:30
time.c ARC: remove @init_time, @init_irq platform callbacks 2015-10-28 16:13:39 +05:30
traps.c ARC: rename unhandled exception handler 2015-04-13 15:14:57 +05:30
troubleshoot.c ARC: fix unused var wanring 2015-07-06 11:09:01 +05:30
unaligned.c ARC: change some branchs to jumps to resolve linkage errors 2015-08-20 18:53:15 +05:30
unwind.c ARC: dw2 unwind: Remove falllback linear search thru FDE entries 2015-11-23 21:36:49 +05:30
vmlinux.lds.S ARC: boot: Support Halt-on-reset and Run-on-reset SMP booting modes 2015-10-28 16:08:17 +05:30