mbox series

[v5,0/3] Kernel stack usage histogram

Message ID 20240730150158.832783-1-pasha.tatashin@soleen.com (mailing list archive)
Headers show
Series Kernel stack usage histogram | expand

Message

Pasha Tatashin July 30, 2024, 3:01 p.m. UTC
Provide histogram of stack sizes for the exited threads:
Example outputs:
Intel:
$ grep kstack /proc/vmstat
kstack_1k 3
kstack_2k 188
kstack_4k 11391
kstack_8k 243
kstack_16k 0

ARM with 64K page_size:
$ grep kstack /proc/vmstat
kstack_1k 1
kstack_2k 340
kstack_4k 25212
kstack_8k 1659
kstack_16k 0
kstack_32k 0
kstack_64k 0

Changelog:
v6:
- Addressed a comment from Yosry Ahmed, renamed IS_INVALID(idx) to
  BAD_STAT_IDX(index), also made it more relaxed (>= instead of ==).
- Added Acked-bys Shakeel Butt

Pasha Tatashin (2):
  vmstat: Kernel stack usage histogram
  task_stack: uninline stack_not_used

Shakeel Butt (1):
  memcg: increase the valid index range for memcg stats

 include/linux/sched/task_stack.h | 18 ++--------
 include/linux/vm_event_item.h    | 24 ++++++++++++++
 kernel/exit.c                    | 57 ++++++++++++++++++++++++++++++++
 kernel/sched/core.c              |  4 +--
 mm/memcontrol.c                  | 50 ++++++++++++++++------------
 mm/vmstat.c                      | 24 ++++++++++++++
 6 files changed, 137 insertions(+), 40 deletions(-)

Comments

Pasha Tatashin July 30, 2024, 3:05 p.m. UTC | #1
Subject in cover-letter should be v6:

i.e: [PATCH v6 0/3] Kernel stack usage histogram