News: 0001506243

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Google Engineer Proposes "Page Detective" As New Kernel Debugging Tool

([Linux Kernel] 5 Hours Ago Page Detective)


Google software engineer Pasha Tatashin has proposed Page Detective as a new kernel debugging tool that is able to provide greater insight around the usage and mapping of physical memory pages.

The initial Page Detective code has been posted in "Request For Comments" form and makes use of the Linux DebugFS interface for providing insight around virtual and physical addresses.

[1]

This insight provided by Page Detective can help developers and server administrators understand about memory page use by the system such as when dealing with memory issues, checksum failures during live migration, file-system journal failures, segmentation faults, and other possible cases of memory corruption.

"Page Detective is a kernel debugging tool designed to provide in-depth information about the usage and mapping of physical memory pages within the Linux kernel. By leveraging the debugfs interface, it enables administrators and developers to investigate the status and allocation of memory pages.

This tool is valuable for diagnosing memory-related issues such as checksum errors during live migration, filesystem journal failures, segmentation faults, and other forms of corruption."

The RFC patches for the Linux page detective were posted today on the [2]Linux kernel mailing list . Pasha further explains in that patch cover letter:

"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."

It will be interesting to see where this Page Detective work leads and if it's of interest to other stakeholders in current form getting it into the mainline Linux kernel.



[1] https://www.phoronix.com/image-viewer.php?id=2024&image=grok_tux_detective_lrg

[2] https://lore.kernel.org/lkml/20241116175922.3265872-1-pasha.tatashin@soleen.com/



dEnigma

Michael

polarathene

dEnigma

turtleidiot

haagch

Most of what I really need to know about how to live, and what to do,
and how to be, I learned in kindergarten. Wisdom was not at the top of the
graduate school mountain but there in the sandbox at nursery school.
These are the things I learned: Share everything. Play fair. Don't
hit people. Put things back where you found them. Clean up your own mess.
Don't take things that aren't yours. Say you're sorry when you hurt someone.
Wash your hands before you eat. Flush. Warm cookies and cold milk are good
for you. Live a balanced life. Learn some and think some and draw and paint
and sing and dance and play and work some every day.
Take a nap every afternoon. When you go out into the world, watch for
traffic, hold hands, and stick together. Be aware of wonder. Remember the
little seed in the plastic cup. The roots go down and the plant goes up and
nobody really knows how or why, but we are all like that. Goldfish and
hamsters and white mice and even the little seed in the plastic cup -- they all
die. So do we.
And then remember the book about Dick and Jane and the first word you
learned, the biggest word of all: LOOK. Everything you need to know is in
there somewhere. The Golden Rule and love and basic sanitation. Ecology and
politics and sane living.
Think of what a better world it would be if we all -- the whole world
-- had cookies and milk about 3 o'clock every afternoon and then lay down with
our blankets for a nap. Or if we had a basic policy in our nation and other
nations to always put things back where we found them and cleaned up our own
messes. And it is still true, no matter how old you are, when you go out into
the world it is best to hold hands and stick together.
-- Robert Fulghum, "All I ever really needed to know I learned
in kindergarten"