From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933745AbcBCX5z (ORCPT ); Wed, 3 Feb 2016 18:57:55 -0500 Received: from mail-pf0-f173.google.com ([209.85.192.173]:34024 "EHLO mail-pf0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752881AbcBCX5x (ORCPT ); Wed, 3 Feb 2016 18:57:53 -0500 Date: Wed, 3 Feb 2016 15:57:51 -0800 (PST) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Michal Hocko cc: Andrew Morton , Mel Gorman , Tetsuo Handa , Oleg Nesterov , Linus Torvalds , Hugh Dickins , Andrea Argangeli , Rik van Riel , linux-mm@kvack.org, LKML , Michal Hocko Subject: Re: [PATCH 2/5] oom reaper: handle mlocked pages In-Reply-To: <1454505240-23446-3-git-send-email-mhocko@kernel.org> Message-ID: References: <1454505240-23446-1-git-send-email-mhocko@kernel.org> <1454505240-23446-3-git-send-email-mhocko@kernel.org> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 3 Feb 2016, Michal Hocko wrote: > 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 and reduce the amount > of reclaimed memory. This is safe from the semantic point of view > because try_to_unmap_one during rmap walk would keep tell the reclaim > to cull the page back and mlock it again. > > munlock_vma_pages_all is also safe to be called from the oom reaper > context because it doesn't sit on any locks but mmap_sem (for read). > > Signed-off-by: Michal Hocko Acked-by: David Rientjes