From: Jin Huang <andy.jinhuang@gmail.com>
To: linux-mm@kvack.org
Subject: How to track the LRU pages access?
Date: Thu, 6 Oct 2022 04:09:15 -0700 [thread overview]
Message-ID: <CACV+naoF8bmVu8dEziSsttPaiHpiamNdRGAhHeZt3sq873jb2A@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1327 bytes --]
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
[-- Attachment #2: Type: text/html, Size: 1696 bytes --]
reply other threads:[~2022-10-06 11:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CACV+naoF8bmVu8dEziSsttPaiHpiamNdRGAhHeZt3sq873jb2A@mail.gmail.com \
--to=andy.jinhuang@gmail.com \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox