* [QUESTION] About VM_LOCKONFAULT for file page
@ 2018-06-04 18:55 Yang Shi
0 siblings, 0 replies; only message in thread
From: Yang Shi @ 2018-06-04 18:55 UTC (permalink / raw)
To: emunson, linux-mm, linux-kernel
Hi folks,
I did a quick test with mlock2 + VM_LOCKONFAULT flag. The test just does
an 1MB anonymous map and 1MB file map with VM_LOCKONFAULT respectively.
Then it tries to access one page of each mapping.
From /proc/meminfo, I can see 1 page marked mlocked from anonymous
mapping. But, the page from file mapping is *not* marked as mlocked.
I can see the do_anonymous_page() calls
lru_cache_add_active_or_unevictable() to set the page's PG_mlocked flag.
But, do_read_fault()/do_shared_fault()/do_cow_fault() don't do it, it
looks they just do it for COW page.
I'm a little bit confused. Does VM_LOCKONFAULT work for anonymous map
only? Or did I miss something? Any hint is appreciated.
Thanks,
Yang
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-06-04 18:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-04 18:55 [QUESTION] About VM_LOCKONFAULT for file page Yang Shi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox