How to track the LRU pages access?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, everyone
My name is Jin Huang, a graduate student interested in Linux Kernel.
Hope I ask the question in the right place.

I want to track the access activity of the pages in the LUR lists, including Anon/File active/inactive lists, the access times and stuff.

(1) I find a function very interesting and promising, void folio_mark_accessed(struct folio *folio), in mm/swap.c in linux v6.0.
Looking at the comment, seems it is used to mark the page access for the LRU algorithm.
(2) I try to use some conditions, like folio_test_lru, folio_test_anon, folio_test_active, to collect the access information for anon_[in/]activelist, file_[in/]activelist.  
(3) From this experiment, I found I could not get the information I want. 

Seems there are always, even I do not run any application, many many file pages access(for system) coming into folio_mark_accessed();
Even though I run some large memory-intensive application workload, the information of the anon pages I get from this function is so limited, only about 200 page access for a more than 50G memory consumption workload.

I want to ask/confirm folio_mark_accessed() does not track every page access as I expect, right? 
Do you have some suggestions if I want to track the LRU page access information? Especially for the application pages.


Thank You
Best
Jin Huang

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux