linux_dsm_epyc7002/arch/arc
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
..
boot DeviceTree updates for 4.4: 2015-11-06 12:17:09 -08:00
configs ARC: switch to arc-linux- CROSS_COMPILE prefix across all configs 2015-11-16 12:00:09 +05:30
include ARCv2: Use the default irq priority for idle sleep 2015-11-16 14:17:06 +05:30
kernel ARC: dw2 unwind: Remove falllback linear search thru FDE entries 2015-11-23 21:36:49 +05:30
lib ARCv2: lib: memcpy: use local symbols 2015-11-03 17:33:00 +05:30
mm ARC: comments update 2015-11-16 12:00:16 +05:30
oprofile ARC: OProfile support 2013-02-15 23:16:00 +05:30
plat-axs10x ARCv2: smp: [plat-*]: No need to explicitly call mcip_init_smp() 2015-10-28 16:13:41 +05:30
plat-sim ARC: remove extraneous header include 2015-11-14 13:11:38 +05:30
plat-tb10x ARC: [plat*] move code out of .init_machine into common 2014-10-13 14:46:13 +05:30
Kbuild ARC: Build system: Makefiles, Kconfig, Linker script 2013-02-11 20:00:25 +05:30
Kconfig ARC: mm: PAE40 support 2015-10-29 18:41:30 +05:30
Kconfig.debug ARC: With earlycon in use, retire EARLY_PRINTK 2015-05-11 11:20:21 +05:30
Makefile arc: use common make variables for dtb builds 2015-10-27 16:12:13 -05:00