linux_dsm_epyc7002/arch/xtensa/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 xtensa: tell git to ignore generated files 2013-06-05 10:14:19 -07:00
align.S xtensa: allow single-stepping through unaligned load/store 2014-08-14 11:59:30 +04:00
asm-offsets.c xtensa: support hardware breakpoints/watchpoints 2016-03-11 08:53:32 +00:00
coprocessor.S xtensa: keep a3 and excsave1 on entry to exception handlers 2013-09-06 09:47:41 -07:00
entry.S xtensa: support hardware breakpoints/watchpoints 2016-03-11 08:53:32 +00:00
head.S xtensa: use context structure for debug exceptions 2016-03-11 08:53:32 +00:00
hw_breakpoint.c xtensa: support hardware breakpoints/watchpoints 2016-03-11 08:53:32 +00:00
irq.c Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-09-01 14:33:35 -07:00
Makefile xtensa: support hardware breakpoints/watchpoints 2016-03-11 08:53:32 +00:00
mcount.S xtensa: add static function tracer support 2013-07-08 01:18:57 -07:00
module.c xtensa: clean up files to make them code-style compliant 2012-12-18 21:10:25 -08:00
mxhead.S xtensa: drop unused sections and remapped reset handlers 2015-11-03 17:19:39 +03:00
pci-dma.c xtensa: support DMA to high memory 2015-11-09 01:25:37 +03:00
pci.c PCI: Revert "PCI: Call pci_read_bridge_bases() from core instead of arch code" 2015-09-15 13:18:04 -05:00
perf_event.c perf core: Allow setting up max frame stack depth via sysctl 2016-04-27 10:20:39 -03:00
platform.c xtensa: cleanup ccount frequency tracking 2013-07-08 01:11:37 -07:00
process.c xtensa: support hardware breakpoints/watchpoints 2016-03-11 08:53:32 +00:00
ptrace.c xtensa: support hardware breakpoints/watchpoints 2016-03-11 08:53:32 +00:00
setup.c xtensa: fix secondary core boot in SMP 2015-11-03 17:19:38 +03:00
signal.c Merge branch 'exec_domain_rip_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/misc 2015-04-15 13:53:55 -07:00
smp.c arch/hotplug: Call into idle with a proper state 2016-03-01 20:36:57 +01:00
stacktrace.c xtensa: move oprofile stack tracing to stacktrace.c 2015-08-17 07:32:49 +03:00
syscall.c xtensa: nommu: don't provide arch_get_unmapped_area 2014-10-21 13:28:48 +04:00
time.c clocksource: cosmetic: Drop OF 'dependency' from symbols 2015-10-01 02:18:39 +02:00
traps.c xtensa: support hardware breakpoints/watchpoints 2016-03-11 08:53:32 +00:00
vectors.S xtensa: use context structure for debug exceptions 2016-03-11 08:53:32 +00:00
vmlinux.lds.S xtensa: drop unused sections and remapped reset handlers 2015-11-03 17:19:39 +03:00
xtensa_ksyms.c xtensa: export __{invalidate,flush}_dcache_range 2014-04-02 01:35:50 +04:00