public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] perf: builtin-record: Be more helpful when running up against mlock limits.
@ 2011-12-19 13:39 Nelson Elhage
  2011-12-19 13:39 ` [PATCH 1/3] perf: __perf_evlist__mmap: Fix errno value on failed map Nelson Elhage
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Nelson Elhage @ 2011-12-19 13:39 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Paul Mackerras, Ingo Molnar, Arnaldo Carvalho de Melo,
	linux-kernel

With the current code, it's relatively easy to run up against the
perf_event_mlock_kb limit if you try to attach to a multithreaded
target with 'perf record -p', because perf will attempt to mmap 512k
per target thread, and the default mlock limit is (512k + 1 page),
total.

Current, this results in a completely inscrutable
  Fatal: failed to mmap with 22 (Invalid argument)

We should perhaps automatically detect a better choice of mmap_pages,
but in the meanwhile, it's easy to improve the error to give users
some guidance about what's going on, so that hopefully I can be the
last person to have to source-dive to figure out what's going on.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-12-29 20:51 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-19 13:39 [PATCH 0/3] perf: builtin-record: Be more helpful when running up against mlock limits Nelson Elhage
2011-12-19 13:39 ` [PATCH 1/3] perf: __perf_evlist__mmap: Fix errno value on failed map Nelson Elhage
2011-12-19 15:33   ` Namhyung Kim
2011-12-19 16:29     ` Arnaldo Carvalho de Melo
2011-12-20 17:55     ` Arnaldo Carvalho de Melo
2011-12-21  8:43   ` [tip:perf/core] perf evlist: Fix errno value reporting on failed mmap tip-bot for Nelson Elhage
2011-12-19 13:39 ` [PATCH 2/3] perf: builtin-record: Provide advice if mmap'ing fails with EPERM Nelson Elhage
2011-12-29 20:50   ` [tip:perf/core] perf: builtin-record: Provide advice if mmap' ing " tip-bot for Nelson Elhage
2011-12-19 13:39 ` [PATCH 3/3] perf: builtin-record: Document and check that mmap_pages must be a power of two Nelson Elhage
2011-12-29 20:50   ` [tip:perf/core] " tip-bot for Nelson Elhage

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox