Re: [RFC 1/3] mm: mmap make MAP_LOCKED really mlock semantic

2015-04-29 Thread Michal Hocko
On Tue 28-04-15 16:10:01, Andrew Morton wrote: > On Tue, 28 Apr 2015 14:11:49 +0200 Michal Hocko wrote: > > > The man page however says > > " > > MAP_LOCKED (since Linux 2.5.37) > > Lock the pages of the mapped region into memory in the manner of > > mlock(2). This flag is ignored in

Re: [RFC 1/3] mm: mmap make MAP_LOCKED really mlock semantic

2015-04-28 Thread Andrew Morton
On Tue, 28 Apr 2015 14:11:49 +0200 Michal Hocko wrote: > The man page however says > " > MAP_LOCKED (since Linux 2.5.37) > Lock the pages of the mapped region into memory in the manner of > mlock(2). This flag is ignored in older kernels. > " I'm trying to remember why we implemente

[RFC 1/3] mm: mmap make MAP_LOCKED really mlock semantic

2015-04-28 Thread Michal Hocko
Cyril has encountered one of the LTP tests failing after 3.12 kernel. To quote him: " What the test does is to set memory limit inside of memcg to PAGESIZE by writing to memory.limit_in_bytes, then runs a subprocess that uses mmap() with MAP_LOCKED which allocates 2 * PAGESIZE and expects that it's