Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1670024

[PATCH 0/4] percpu: add basic stats and tracepoints to percpu allocator

From Dennis Zhou <dennisz@fb.com>
Newsgroups linux.kernel
Subject [PATCH 0/4] percpu: add basic stats and tracepoints to percpu allocator
Date 2017-06-20 01:30 +0200
Message-ID <tUehj-Na-11@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


There is limited visibility into the percpu memory allocator making it hard to
understand usage patterns. Without these concrete numbers, we are left to
conjecture about the correctness of percpu memory patterns and usage.
Additionally, there is no mechanism to review the correctness/efficiency of the
current implementation.

This patchset address the following:
- Adds basic statistics to reason about the number of allocations over the
  lifetime, allocation sizes, and fragmentation.
- Adds tracepoints to enable better debug capabilities as well as the ability
  to review allocation requests and corresponding decisions.

This patchiest contains the following four patches:
0001-percpu-add-missing-lockdep_assert_held-to-func-pcpu_.patch
0002-percpu-migrate-percpu-data-structures-to-internal-he.patch
0003-percpu-expose-statistics-about-percpu-memory-via-deb.patch
0004-percpu-add-tracepoint-support-for-percpu-memory.patch

0001 adds a missing lockdep_assert_held for pcpu_lock to improve consistency
and safety. 0002 prepares for the following patches by moving the definition of
data structures and exposes previously static variables. 0003 adds percpu
statistics via debugfs. 0004 adds tracepoints to key percpu events: chunk
creation/deletion and area allocation/free/failure.

This patchset is on top of linus#master 1132d5e.

diffstats below:

  percpu: add missing lockdep_assert_held to func pcpu_free_area
  percpu: migrate percpu data structures to internal header
  percpu: expose statistics about percpu memory via debugfs
  percpu: add tracepoint support for percpu memory

 include/trace/events/percpu.h | 125 ++++++++++++++++++++++++
 mm/Kconfig                    |   8 ++
 mm/Makefile                   |   1 +
 mm/percpu-internal.h          | 164 +++++++++++++++++++++++++++++++
 mm/percpu-km.c                |   6 ++
 mm/percpu-stats.c             | 222 ++++++++++++++++++++++++++++++++++++++++++
 mm/percpu-vm.c                |   7 ++
 mm/percpu.c                   |  53 +++++-----
 8 files changed, 563 insertions(+), 23 deletions(-)
 create mode 100644 include/trace/events/percpu.h
 create mode 100644 mm/percpu-internal.h
 create mode 100644 mm/percpu-stats.c

Thanks,
Dennis

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH 0/4] percpu: add basic stats and tracepoints to percpu allocator Dennis Zhou <dennisz@fb.com> - 2017-06-20 01:30 +0200
  [PATCH 1/4] percpu: add missing lockdep_assert_held to func pcpu_free_area Dennis Zhou <dennisz@fb.com> - 2017-06-20 01:30 +0200
  [PATCH 2/4] percpu: migrate percpu data structures to internal header Dennis Zhou <dennisz@fb.com> - 2017-06-20 01:30 +0200
  Re: [PATCH 0/4] percpu: add basic stats and tracepoints to percpu  allocator Tejun Heo <tj@kernel.org> - 2017-06-20 19:50 +0200
    Re: [PATCH 0/4] percpu: add basic stats and tracepoints to percpu  allocator Dennis Zhou <dennisz@fb.com> - 2017-06-20 21:20 +0200
      Re: [PATCH 0/4] percpu: add basic stats and tracepoints to percpu  allocator Tejun Heo <tj@kernel.org> - 2017-06-20 21:40 +0200

csiph-web