linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* mm, thp: fix mapped pages avoiding unevictable list on mlock
@ 2013-04-05  7:45 Simon Jeons
  0 siblings, 0 replies; only message in thread
From: Simon Jeons @ 2013-04-05  7:45 UTC (permalink / raw)
  To: David Rientjes; +Cc: Linux Memory Management List

[-- 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 --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-04-05  7:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-05  7:45 mm, thp: fix mapped pages avoiding unevictable list on mlock Simon Jeons

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).