Skip to content

Monitor and report dirty pages in Linux Kernel for a specific process

Notifications You must be signed in to change notification settings

jackkolokasis/dirty_pages

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Trace dirty pages in Linux kernel page cache

Monitor and report dirty pages in Linux Kernel for a specific process. We provide two implementations:

  1. Reading maps, pagemaps, and kpageflags files from sysfs
  2. Linux kernel module that read the page cache for the specific file. This implementation is for Linux kernel v.6.1.

Build example that uses sysfs

cd sysfs
make
./example <filename> <size> <num_dirty_pages>

Build kernel module

cd module
# Edit the version of the kernel inside the Makefile
# Edit the username for /dev/trace_dirty_pages
# You need sudo permissions
make

Test the kernel module

cd tests
# Edit the username for /dev/trace_dirty_pages
# Replace the path /mnt/fmap/file.txt with your own path
make
./example <filename> <size> <num_dirty_pages>

Limitations

We do not support at this time in the kernel module the use of madvise. Madvise splits the vma area so we do not handle this case

About

Monitor and report dirty pages in Linux Kernel for a specific process

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published