lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Wed,  7 Oct 2020 11:44:01 -0700
From:   Axel Rasmussen <axelrasmussen@...gle.com>
To:     Steven Rostedt <rostedt@...dmis.org>,
        Ingo Molnar <mingo@...hat.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Michel Lespinasse <walken@...gle.com>,
        Vlastimil Babka <vbabka@...e.cz>,
        Daniel Jordan <daniel.m.jordan@...cle.com>,
        Laurent Dufour <ldufour@...ux.ibm.com>,
        Axel Rasmussen <axelrasmussen@...gle.com>,
        Jann Horn <jannh@...gle.com>,
        Chinwen Chang <chinwen.chang@...iatek.com>
Cc:     Yafang Shao <laoar.shao@...il.com>, linux-kernel@...r.kernel.org,
        linux-mm@...ck.org
Subject: [PATCH v2 0/2] Add tracepoints around mmap_lock acquisition

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]), and incorporates feedback from the review of the previous
version:

- 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         | 112 +++++++++++++++++++++++++++---
 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, 265 insertions(+), 10 deletions(-)
 create mode 100644 include/trace/events/mmap_lock.h
 create mode 100644 mm/mmap_lock.c

--
2.28.0.806.g8561365e88-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ