linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/3] Kernel stack usage histogram
@ 2024-07-24 20:33 Pasha Tatashin
  2024-07-24 20:33 ` [PATCH v5 1/3] memcg: increase the valid index range for memcg stats Pasha Tatashin
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Pasha Tatashin @ 2024-07-24 20:33 UTC (permalink / raw)
  To: akpm, jpoimboe, pasha.tatashin, kent.overstreet, peterz, nphamcs,
	cerasuolodomenico, surenb, lizhijian, willy, shakeel.butt,
	vbabka, ziy, linux-kernel, linux-mm

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:
v5:
Uninlined stack_not_used() and kstack_histogram()  per mailing list
discussion
Use count_vm_event() instead of this_cpu_inc()
Increase memcg_event limit from s8_max to u8_max.

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(-)

-- 
2.45.2.1089.g2a221341d9-goog



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

end of thread, other threads:[~2024-07-25 15:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-24 20:33 [PATCH v5 0/3] Kernel stack usage histogram Pasha Tatashin
2024-07-24 20:33 ` [PATCH v5 1/3] memcg: increase the valid index range for memcg stats Pasha Tatashin
2024-07-24 23:17   ` Yosry Ahmed
2024-07-25 14:25     ` Pasha Tatashin
2024-07-24 20:33 ` [PATCH v5 2/3] vmstat: Kernel stack usage histogram Pasha Tatashin
2024-07-24 20:49   ` Shakeel Butt
2024-07-24 20:33 ` [PATCH v5 3/3] task_stack: uninline stack_not_used Pasha Tatashin
2024-07-24 20:50   ` Shakeel Butt
2024-07-25 14:30     ` Pasha Tatashin
2024-07-25 15:57       ` Shakeel Butt

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