3

Where can I get active/inactive page lists inside Linux kernel which is maintained for memory management? Basically I want to dump these lists' info periodically, so I could understand which pages are active/inactive? Ultimate goal is to find which shared libraries are being actively used, and which other are not so actively.

Thanks,

Arjun Bora
  • 439
  • 2
  • 8
  • 20

1 Answers1

2

Years late, but for anyone else who needs it:

The active/inactive lists are lru lists and have type lruvec.

On Linux 5.6 the enum lru_lists and the corresponding struct lruvec are defined in include/linux/mmzone.h.

Then, there are a few functions that I know of that return lruvec:

mem_cgroup_page_lruvec()
mem_cgroup_lruvec()
wxz
  • 2,254
  • 1
  • 10
  • 31