Re: [PATCH 2/2] oom reaper: handle anonymous mlocked pages

2016-01-07 Thread Michal Hocko
On Wed 06-01-16 16:42:55, Michal Hocko wrote: > Anonymous mappings > are not visible by any other process so doing a munlock before unmap > is safe to do from the semantic point of view. I was too conservative here. I have completely forgoten about the lazy mlock handling during try_to_unmap which

[PATCH 2/2] oom reaper: handle anonymous mlocked pages

2016-01-06 Thread Michal Hocko
From: Michal Hocko __oom_reap_vmas current skips over all mlocked vmas because they need a special treatment before they are unmapped. This is primarily done for simplicity. There is no reason to skip over them for all mappings though and reduce the amount of reclaimed memory. Anonymous mappings