linux-stable/arch/mips/kernel
Arnaldo Carvalho de Melo c5dfd78eb7 perf core: Allow setting up max frame stack depth via sysctl
The default remains 127, which is good for most cases, and not even hit
most of the time, but then for some cases, as reported by Brendan, 1024+
deep frames are appearing on the radar for things like groovy, ruby.

And in some workloads putting a _lower_ cap on this may make sense. One
that is per event still needs to be put in place tho.

The new file is:

  # cat /proc/sys/kernel/perf_event_max_stack
  127

Chaging it:

  # echo 256 > /proc/sys/kernel/perf_event_max_stack
  # cat /proc/sys/kernel/perf_event_max_stack
  256

But as soon as there is some event using callchains we get:

  # echo 512 > /proc/sys/kernel/perf_event_max_stack
  -bash: echo: write error: Device or resource busy
  #

Because we only allocate the callchain percpu data structures when there
is a user, which allows for changing the max easily, its just a matter
of having no callchain users at that point.

Reported-and-Tested-by: Brendan Gregg <brendan.d.gregg@gmail.com>
Reviewed-by: Frederic Weisbecker <fweisbec@gmail.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: David Ahern <dsahern@gmail.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: He Kuang <hekuang@huawei.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Milian Wolff <milian.wolff@kdab.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Cc: Wang Nan <wangnan0@huawei.com>
Cc: Zefan Li <lizefan@huawei.com>
Link: http://lkml.kernel.org/r/20160426002928.GB16708@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2016-04-27 10:20:39 -03:00
..
.gitignore
8250-platform.c
asm-offsets.c MIPS: Set trap_no field in thread_struct on exception. 2015-09-03 12:08:04 +02:00
binfmt_elfn32.c mips: Differentiate between 32 and 64 bit ELF header 2016-02-11 11:38:22 +01:00
binfmt_elfo32.c mips: Differentiate between 32 and 64 bit ELF header 2016-02-11 11:38:22 +01:00
bmips_vec.S
branch.c MIPS: Fix branch emulation for BLTC and BGEC instructions 2015-07-09 11:10:40 +02:00
cevt-bcm1480.c MIPS: cevt-bcm1480: Migrate to new 'set-state' interface 2015-09-03 12:07:51 +02:00
cevt-ds1287.c MIPS: cevt-ds1287: Migrate to new 'set-state' interface 2015-09-03 12:07:51 +02:00
cevt-gt641xx.c MIPS: cevt-gt641xx: Migrate to new 'set-state' interface 2015-09-03 12:07:51 +02:00
cevt-r4k.c MIPS: cevt-r4k: Migrate to new 'set-state' interface 2015-09-03 12:07:52 +02:00
cevt-sb1250.c MIPS: cevt-sb1250: Migrate to new 'set-state' interface 2015-09-03 12:07:52 +02:00
cevt-txx9.c MIPS: cevt-txx9: Migrate to new 'set-state' interface 2015-09-03 12:07:53 +02:00
cps-vec-ns16550.S MIPS: CPS: Early debug using an ns16550-compatible UART 2015-11-11 08:34:25 +01:00
cps-vec.S MIPS: CPS: drop .set mips64r2 directives 2015-12-22 12:16:32 +01:00
cpu-bugs64.c MIPS: Use EXCCODE_ constants with set_except_vector() 2016-01-24 03:28:21 +01:00
cpu-probe.c MIPS: Add IEEE Std 754 conformance mode selection 2016-01-20 00:39:20 +01:00
crash.c mips: fix up obsolete cpu function usage. 2015-03-05 15:25:06 +10:30
crash_dump.c
csrc-bcm1480.c MIPS: csrc-bcm1480: Implement read_sched_clock 2015-04-01 17:21:27 +02:00
csrc-ioasic.c MIPS: csrc-ioasic: Implement read_sched_clock 2015-04-01 17:21:28 +02:00
csrc-r4k.c MIPS: VDSO: Add implementations of gettimeofday() and clock_gettime() 2015-11-11 08:36:41 +01:00
csrc-sb1250.c MIPS: csrc-sb1250: Implement read_sched_clock 2015-04-01 17:21:33 +02:00
early_printk.c
early_printk_8250.c
elf.c MIPS: Add IEEE Std 754 conformance mode selection 2016-01-20 00:39:20 +01:00
entry.S MIPS: kernel: entry.S: Set correct ISA level for mips_ihb 2015-04-10 15:41:46 +02:00
ftrace.c
genex.S MIPS: Fix LLVM build issue. 2015-08-18 11:40:20 +02:00
gpio_txx9.c MIPS: txx9: switch to gpiochip_add_data() 2016-02-19 09:51:44 +01:00
head.S MIPS: Add support for vmlinux.bin appended dtb 2015-06-21 21:54:14 +02:00
i8253.c
idle.c Merge branch '4.3-fixes' into mips-for-linux-next 2015-11-12 11:36:03 +01:00
irq-gt641xx.c
irq-msc01.c
irq-rm7000.c
irq.c MIPS: IRQ/IP27: Move IRQ allocation API to platform code. 2015-06-21 21:54:31 +02:00
irq_txx9.c
jump_label.c jump_label: Rename JUMP_LABEL_{EN,DIS}ABLE to JUMP_LABEL_{JMP,NOP} 2015-08-03 11:34:12 +02:00
kgdb.c MIPS: Get rid of 'kgdb_early_setup' cruft. 2015-06-21 21:54:10 +02:00
kprobes.c
linux32.c
machine_kexec.c
Makefile MIPS: Delete smp-gic.c 2016-02-25 10:56:58 +01:00
mcount.S
mips-cm.c MIPS: Fix misspellings in comments. 2016-04-03 12:32:09 +02:00
mips-cpc.c MIPS: CM, CPC: Ensure core-other GCRs reflect the correct core 2015-11-11 08:35:18 +01:00
mips-mt-fpaff.c MIPS: Fix sched_getaffinity with MT FPAFF enabled 2015-08-03 09:25:02 +02:00
mips-mt.c
mips-r2-to-r6-emul.c MIPS: traps: Correct the SIGTRAP debug ABI in do_watch' and do_trap_or_bp' 2016-04-03 12:32:09 +02:00
mips_ksyms.c MIPS: uaccess: Take EVA into account in [__]clear_user 2015-12-22 11:58:43 +01:00
mips_machine.c
module-rela.c MIPS: Bail on unsupported module relocs 2016-04-03 12:32:10 +02:00
module.c MIPS: Bail on unsupported module relocs 2016-04-03 12:32:10 +02:00
octeon_switch.S MIPS: Fix octeon FP context switch handling 2015-10-02 19:16:06 +02:00
perf_event.c perf core: Allow setting up max frame stack depth via sysctl 2016-04-27 10:20:39 -03:00
perf_event_mipsxx.c MIPS: Fix misspellings in comments. 2016-04-03 12:32:09 +02:00
pm-cps.c MIPS: Fix misspellings in comments. 2016-04-03 12:32:09 +02:00
pm.c
proc.c MIPS: Add support for XPA. 2015-03-19 17:39:49 +01:00
process.c MIPS: Fix misspellings in comments. 2016-04-03 12:32:09 +02:00
prom.c MIPS: Fix build with CONFIG_OF=y for non OF-enabled targets 2015-08-03 09:25:00 +02:00
ptrace.c MIPS: ptrace: Drop cp0_tcstatus from regoffset_table[] 2016-01-24 02:24:24 +01:00
ptrace32.c
r4k_fpu.S MIPS: Avoid variant of .type unsupported by LLVM Assembler 2016-02-29 11:23:49 +01:00
r4k_switch.S MIPS: Tidy up FPU context switching 2015-09-03 12:08:05 +02:00
r2300_fpu.S MIPS: Avoid variant of .type unsupported by LLVM Assembler 2016-02-29 11:23:49 +01:00
r2300_switch.S MIPS: Fix R2300 FP context switch handling 2015-10-02 19:16:46 +02:00
r6000_fpu.S
relocate_kernel.S MIPS: Replace add and sub instructions in relocate_kernel.S with addiu 2015-08-03 15:26:30 +02:00
reset.c MIPS: Provide fallback reboot/poweroff/halt implementations 2015-04-01 17:21:58 +02:00
rtlx-cmp.c
rtlx-mt.c
rtlx.c
scall32-o32.S MIPS: Wire up preadv2 and pwrite2 syscalls. 2016-04-03 09:41:34 +02:00
scall64-64.S MIPS: Wire up preadv2 and pwrite2 syscalls. 2016-04-03 09:41:34 +02:00
scall64-n32.S MIPS: Wire up preadv2 and pwrite2 syscalls. 2016-04-03 09:41:34 +02:00
scall64-o32.S MIPS: Wire up preadv2 and pwrite2 syscalls. 2016-04-03 09:41:34 +02:00
segment.c MIPS: Declare mips_debugfs_dir in a header 2015-10-26 09:49:42 +01:00
setup.c Linux 4.5-rc6 2016-03-04 12:12:08 +01:00
signal-common.h MIPS: Save MSA extended context around signals 2015-09-03 12:07:59 +02:00
signal.c MIPS: Initial implementation of a VDSO 2015-11-11 08:36:36 +01:00
signal32.c MIPS: Initial implementation of a VDSO 2015-11-11 08:36:36 +01:00
signal_n32.c MIPS: Initial implementation of a VDSO 2015-11-11 08:36:36 +01:00
smp-bmips.c MIPS: SMP: Don't increment irq_count multiple times for call function IPIs 2015-08-03 09:25:12 +02:00
smp-cmp.c MIPS: Make smp CMP, CPS and MT use the new generic IPI functions 2016-02-25 10:56:58 +01:00
smp-cps.c MIPS: Make smp CMP, CPS and MT use the new generic IPI functions 2016-02-25 10:56:58 +01:00
smp-gic.c MIPS: CM: make use of mips_cm_{lock,unlock}_other 2015-11-11 08:35:17 +01:00
smp-mt.c MIPS: Make smp CMP, CPS and MT use the new generic IPI functions 2016-02-25 10:56:58 +01:00
smp-up.c
smp.c MIPS: Fix broken malta qemu 2016-03-29 14:18:18 +02:00
spinlock_test.c MIPS: Declare mips_debugfs_dir in a header 2015-10-26 09:49:42 +01:00
spram.c MIPS: Add cases for CPU_I6400 2015-08-26 15:23:03 +02:00
stacktrace.c MIPS: Add LATENCYTOP support 2015-11-11 08:36:46 +01:00
sync-r4k.c MIPS: sync-r4k: reduce skew while synchronization 2016-01-24 01:31:51 +01:00
syscall.c MIPS: kernel: syscall: Set the appropriate ISA level for MIPS R6 2015-02-17 15:37:29 +00:00
sysrq.c MIPS: Refactor dumping of TLB registers for r3k/r4k 2015-09-03 12:07:45 +02:00
time.c
topology.c
traps.c MIPS: traps.c: Verify the ISA for microMIPS RDHWR emulation 2016-04-04 15:25:34 +02:00
unaligned.c MIPS: Fix MSA ld unaligned failure cases 2016-03-29 14:18:18 +02:00
uprobes.c MIPS: Add uprobes support. 2015-09-03 12:08:05 +02:00
vdso.c MIPS: VDSO: Add implementations of gettimeofday() and clock_gettime() 2015-11-11 08:36:41 +01:00
vmlinux.lds.S arch, ftrace: for KASAN put hard/soft IRQ entries into separate sections 2016-03-25 16:37:42 -07:00
vpe-cmp.c
vpe-mt.c
vpe.c module: use a structure to encapsulate layout. 2015-12-04 22:46:25 +01:00
watch.c