Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

active/inactive list in linux kernel

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,

like image 813
Arjun Bora Avatar asked Jul 27 '26 10:07

Arjun Bora


1 Answers

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()
like image 75
wxz Avatar answered Jul 30 '26 08:07

wxz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!