linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] Add tracepoints around mmap_lock acquisition
@ 2020-10-09 22:05 Axel Rasmussen
  2020-10-09 22:05 ` [PATCH v3 1/2] tracing: support "bool" type in synthetic trace events Axel Rasmussen
  2020-10-09 22:05 ` [PATCH v3 2/2] mmap_lock: add tracepoints around lock acquisition Axel Rasmussen
  0 siblings, 2 replies; 13+ messages in thread
From: Axel Rasmussen @ 2020-10-09 22:05 UTC (permalink / raw)
  To: Steven Rostedt, Ingo Molnar, Andrew Morton, Michel Lespinasse,
	Vlastimil Babka, Daniel Jordan, Laurent Dufour, Axel Rasmussen,
	Jann Horn, Chinwen Chang
  Cc: Yafang Shao, linux-kernel, linux-mm

This patchset adds tracepoints around mmap_lock acquisition. This is useful so
we can measure the latency of lock acquisition, in order to detect contention.

This version is based upon linux-next (since it depends on some recently-merged
patches [1] [2]).

Changes since v2:

- Refactored tracing helper functions so the helpers are simper, but the locking
  functinos are slightly more verbose. Overall, this decreased the delta to
  mmap_lock.h slightly.

- Fixed a typo in a comment. :)

Changes since v1:

- Functions renamed to reserve the "trace_" prefix for actual tracepoints.

- We no longer measure the duration directly. Instead, users are expected to
  construct a synthetic event which computes the interval between "start
  locking" and "acquire returned".

- The new helper for checking if tracepoints are enabled in a header is used to
  avoid un-inlining any of the lock wrappers. This yields ~zero overhead if the
  tracepoints aren't enabled, and therefore obviates the need for a Kconfig for
  this change.

[1] https://lore.kernel.org/patchwork/patch/1316922/
[2] https://lore.kernel.org/patchwork/patch/1311996/

Axel Rasmussen (2):
  tracing: support "bool" type in synthetic trace events
  mmap_lock: add tracepoints around lock acquisition

 include/linux/mmap_lock.h         | 93 +++++++++++++++++++++++++++++--
 include/trace/events/mmap_lock.h  | 70 +++++++++++++++++++++++
 kernel/trace/trace_events_synth.c |  4 ++
 mm/Makefile                       |  2 +-
 mm/mmap_lock.c                    | 87 +++++++++++++++++++++++++++++
 5 files changed, 250 insertions(+), 6 deletions(-)
 create mode 100644 include/trace/events/mmap_lock.h
 create mode 100644 mm/mmap_lock.c

--
2.28.0.1011.ga647a8990f-goog



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

end of thread, other threads:[~2020-10-20 18:18 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-09 22:05 [PATCH v3 0/2] Add tracepoints around mmap_lock acquisition Axel Rasmussen
2020-10-09 22:05 ` [PATCH v3 1/2] tracing: support "bool" type in synthetic trace events Axel Rasmussen
2020-10-12 14:15   ` Steven Rostedt
2020-10-12 14:26     ` Tom Zanussi
2020-10-12 14:46       ` Steven Rostedt
2020-10-12 16:23         ` Axel Rasmussen
2020-10-13 19:41   ` David Rientjes
2020-10-09 22:05 ` [PATCH v3 2/2] mmap_lock: add tracepoints around lock acquisition Axel Rasmussen
2020-10-09 22:35   ` Michel Lespinasse
2020-10-10  5:31   ` Yafang Shao
2020-10-13 19:42   ` David Rientjes
2020-10-20 14:50   ` Vlastimil Babka
2020-10-20 18:17     ` Axel Rasmussen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).