linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [RFCv1 0/6] Page Detective
@ 2024-11-16 17:59 Pasha Tatashin
  2024-11-16 17:59 ` [RFCv1 1/6] mm: Make get_vma_name() function public Pasha Tatashin
                   ` (8 more replies)
  0 siblings, 9 replies; 43+ messages in thread
From: Pasha Tatashin @ 2024-11-16 17:59 UTC (permalink / raw)
  To: pasha.tatashin, linux-kernel, linux-mm, linux-doc, linux-fsdevel,
	cgroups, linux-kselftest, akpm, corbet, derek.kiernan,
	dragan.cvetic, arnd, gregkh, viro, brauner, jack, tj, hannes,
	mhocko, roman.gushchin, shakeel.butt, muchun.song, Liam.Howlett,
	lorenzo.stoakes, vbabka, jannh, shuah, vegard.nossum, vattunuru,
	schalla, david, willy, osalvador, usama.anjum, andrii,
	ryan.roberts, peterx, oleg, tandersen, rientjes, gthelen

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



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

end of thread, other threads:[~2024-11-20 19:16 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-16 17:59 [RFCv1 0/6] Page Detective Pasha Tatashin
2024-11-16 17:59 ` [RFCv1 1/6] mm: Make get_vma_name() function public Pasha Tatashin
2024-11-18 10:26   ` Lorenzo Stoakes
2024-11-18 20:40     ` Pasha Tatashin
2024-11-18 20:44       ` Matthew Wilcox
2024-11-18 22:26         ` Pasha Tatashin
2024-11-16 17:59 ` [RFCv1 2/6] pagewalk: Add a page table walker for init_mm page table Pasha Tatashin
2024-11-18  6:49   ` Christoph Hellwig
2024-11-18 10:32     ` Lorenzo Stoakes
2024-11-18 20:42     ` Pasha Tatashin
2024-11-16 17:59 ` [RFCv1 3/6] mm: Add a dump_page variant that accept log level argument Pasha Tatashin
2024-11-16 17:59 ` [RFCv1 4/6] misc/page_detective: Introduce Page Detective Pasha Tatashin
2024-11-16 22:20   ` Jonathan Corbet
2024-11-18 20:43     ` Pasha Tatashin
2024-11-18 11:11   ` Lorenzo Stoakes
2024-11-18 21:55   ` Jann Horn
2024-11-16 17:59 ` [RFCv1 5/6] misc/page_detective: enable loadable module Pasha Tatashin
2024-11-16 17:59 ` [RFCv1 6/6] selftests/page_detective: Introduce self tests for Page Detective Pasha Tatashin
2024-11-17  6:25   ` Muhammad Usama Anjum
2024-11-18 20:27     ` Pasha Tatashin
2024-11-18 11:17 ` [RFCv1 0/6] " Lorenzo Stoakes
2024-11-18 12:53   ` Jann Horn
2024-11-18 22:24     ` Pasha Tatashin
2024-11-19  0:39       ` Jann Horn
2024-11-19  1:29         ` Pasha Tatashin
2024-11-19 12:52           ` Jann Horn
2024-11-19 15:14             ` Pasha Tatashin
2024-11-19 15:53               ` Jann Horn
2024-11-19 18:51             ` Matthew Wilcox
2024-11-18 19:11 ` Roman Gushchin
2024-11-18 22:08   ` Pasha Tatashin
2024-11-19  1:09     ` Greg KH
2024-11-19 15:08       ` Pasha Tatashin
2024-11-19 18:23         ` Roman Gushchin
2024-11-19 19:30           ` Pasha Tatashin
2024-11-19 19:35             ` Yosry Ahmed
2024-11-19 20:57               ` Roman Gushchin
2024-11-20 16:13               ` Pasha Tatashin
2024-11-20 17:33                 ` Yosry Ahmed
2024-11-20 17:46                   ` Pasha Tatashin
2024-11-20 15:29 ` Andi Kleen
2024-11-20 16:40   ` Pasha Tatashin
2024-11-20 19:14     ` Andi Kleen

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