[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241116175922.3265872-1-pasha.tatashin@soleen.com>
Date: Sat, 16 Nov 2024 17:59:16 +0000
From: Pasha Tatashin <pasha.tatashin@...een.com>
To: pasha.tatashin@...een.com,
linux-kernel@...r.kernel.org,
linux-mm@...ck.org,
linux-doc@...r.kernel.org,
linux-fsdevel@...r.kernel.org,
cgroups@...r.kernel.org,
linux-kselftest@...r.kernel.org,
akpm@...ux-foundation.org,
corbet@....net,
derek.kiernan@....com,
dragan.cvetic@....com,
arnd@...db.de,
gregkh@...uxfoundation.org,
viro@...iv.linux.org.uk,
brauner@...nel.org,
jack@...e.cz,
tj@...nel.org,
hannes@...xchg.org,
mhocko@...nel.org,
roman.gushchin@...ux.dev,
shakeel.butt@...ux.dev,
muchun.song@...ux.dev,
Liam.Howlett@...cle.com,
lorenzo.stoakes@...cle.com,
vbabka@...e.cz,
jannh@...gle.com,
shuah@...nel.org,
vegard.nossum@...cle.com,
vattunuru@...vell.com,
schalla@...vell.com,
david@...hat.com,
willy@...radead.org,
osalvador@...e.de,
usama.anjum@...labora.com,
andrii@...nel.org,
ryan.roberts@....com,
peterx@...hat.com,
oleg@...hat.com,
tandersen@...flix.com,
rientjes@...gle.com,
gthelen@...gle.com
Subject: [RFCv1 0/6] Page Detective
Page Detective is a new kernel debugging tool that provides detailed
information about the usage and mapping of physical memory pages.
It is often known that a particular page is corrupted, but it is hard to
extract more information about such a page from live system. Examples
are:
- Checksum failure during live migration
- Filesystem journal failure
- dump_page warnings on the console log
- Unexcpected segfaults
Page Detective helps to extract more information from the kernel, so it
can be used by developers to root cause the associated problem.
It operates through the Linux debugfs interface, with two files: "virt"
and "phys".
The "virt" file takes a virtual address and PID and outputs information
about the corresponding page.
The "phys" file takes a physical address and outputs information about
that page.
The output is presented via kernel log messages (can be accessed with
dmesg), and includes information such as the page's reference count,
mapping, flags, and memory cgroup. It also shows whether the page is
mapped in the kernel page table, and if so, how many times.
Pasha Tatashin (6):
mm: Make get_vma_name() function public
pagewalk: Add a page table walker for init_mm page table
mm: Add a dump_page variant that accept log level argument
misc/page_detective: Introduce Page Detective
misc/page_detective: enable loadable module
selftests/page_detective: Introduce self tests for Page Detective
Documentation/misc-devices/index.rst | 1 +
Documentation/misc-devices/page_detective.rst | 78 ++
MAINTAINERS | 8 +
drivers/misc/Kconfig | 11 +
drivers/misc/Makefile | 1 +
drivers/misc/page_detective.c | 808 ++++++++++++++++++
fs/inode.c | 18 +-
fs/kernfs/dir.c | 1 +
fs/proc/task_mmu.c | 61 --
include/linux/fs.h | 5 +-
include/linux/mmdebug.h | 1 +
include/linux/pagewalk.h | 2 +
kernel/pid.c | 1 +
mm/debug.c | 53 +-
mm/memcontrol.c | 1 +
mm/oom_kill.c | 1 +
mm/pagewalk.c | 32 +
mm/vma.c | 60 ++
tools/testing/selftests/Makefile | 1 +
.../selftests/page_detective/.gitignore | 1 +
.../testing/selftests/page_detective/Makefile | 7 +
tools/testing/selftests/page_detective/config | 4 +
.../page_detective/page_detective_test.c | 727 ++++++++++++++++
23 files changed, 1787 insertions(+), 96 deletions(-)
create mode 100644 Documentation/misc-devices/page_detective.rst
create mode 100644 drivers/misc/page_detective.c
create mode 100644 tools/testing/selftests/page_detective/.gitignore
create mode 100644 tools/testing/selftests/page_detective/Makefile
create mode 100644 tools/testing/selftests/page_detective/config
create mode 100644 tools/testing/selftests/page_detective/page_detective_test.c
--
2.47.0.338.g60cca15819-goog
Powered by blists - more mailing lists