mm/page_owner: Report memory cgroup info
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2073625
MR: !703 (merged)
This MR includes upstream patches that enable the reporting of memory cgroup information on the page_owner debugfs file. These information will be helpful in diagnosing problem related to dying memory cgroups as it can help to identify pages that pin down the dying memory cgroups from being freed. These dying memory cgroups can cause a substantial increase in the amount of percpu memory used.
Beside memory cgroup information, it also shows the actual command that initiates page allocation as well as its pid, timestamp and tgid. These information will make page_owner more useful.
Signed-off-by: Waiman Long longman@redhat.com
Waiman Long (16):
test_printf: Make pft array const
test_printf: Remove separate page_flags variable
test_printf: Remove custom appending of '|'
test_printf: Append strings more efficiently
vsprintf: Make %pGp print the hex value
stacktrace: move filter_irq_stacks() to kernel/stacktrace.c
lib, stackdepot: check stackdepot handle before accessing slabs
lib, stackdepot: add helper to print stack entries
lib, stackdepot: add helper to print stack entries into buffer
mm: make some vars and functions static or __init
lib/vsprintf: avoid redundant work with 0 size
mm/page_owner: use scnprintf() to avoid excessive buffer overrun check
mm/page_owner: print memcg information
mm/page_owner: record task command name
mm/page_owner.c: record tgid
vsprintf: Update %pGp documentation about that it prints hex value
Documentation/core-api/printk-formats.rst | 2 +-
drivers/gpu/drm/drm_dp_mst_topology.c | 5 +-
drivers/gpu/drm/drm_mm.c | 5 +-
drivers/gpu/drm/i915/i915_vma.c | 5 +-
drivers/gpu/drm/i915/intel_runtime_pm.c | 20 ++---
include/linux/page_idle.h | 1 -
include/linux/stackdepot.h | 5 +-
include/linux/stacktrace.h | 1 +
kernel/stacktrace.c | 30 +++++++
lib/stackdepot.c | 70 ++++++++++------
lib/test_printf.c | 61 ++++++--------
lib/vsprintf.c | 16 +++-
mm/debug.c | 2 +-
mm/kasan/report.c | 15 +---
mm/memory-failure.c | 8 +-
mm/page_ext.c | 4 +-
mm/page_owner.c | 97 +++++++++++++++--------
mm/slub.c | 4 +-
18 files changed, 206 insertions(+), 145 deletions(-)
Edited by Waiman Long