active/inactive list in linux kernel

756 Views Asked by At

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,

1

There are 1 best solutions below

0
wxz On

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()