From: Simon Jeons <simon.jeons@gmail.com>
To: David Rientjes <rientjes@google.com>
Cc: Linux Memory Management List <linux-mm@kvack.org>
Subject: mm, thp: fix mapped pages avoiding unevictable list on mlock
Date: Fri, 05 Apr 2013 15:45:59 +0800 [thread overview]
Message-ID: <515E8137.8050709@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 696 bytes --]
Hi David,
http://marc.info/?l=linux-mm&m=134810397323814&w=2
#define MAP_SIZE (4 << 30) /* 4GB */
void *ptr = mmap(NULL, MAP_SIZE, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS, 0, 0);
mlock(ptr, MAP_SIZE);
$ grep -E "Unevictable|Inactive\(anon" /proc/meminfo
Inactive(anon): 6304 kB
Unevictable: 4213924 kB
These pages are allocated in mlock path(gup), correct? If the answer is yes,follow_page also will not set these pages unevictable, is it? Then how you get these pages unevictable?
munlock(ptr, MAP_SIZE);
Inactive(anon): 4186252 kB
Unevictable: 19652 kB
mlock(ptr, MAP_SIZE);
Inactive(anon): 4198556 kB
Unevictable: 21684 kB
[-- Attachment #2: Type: text/html, Size: 1891 bytes --]
reply other threads:[~2013-04-05 7:46 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=515E8137.8050709@gmail.com \
--to=simon.jeons@gmail.com \
--cc=linux-mm@kvack.org \
--cc=rientjes@google.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.