Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752853AbdF0MDc (ORCPT ); Tue, 27 Jun 2017 08:03:32 -0400 Received: from mx2.suse.de ([195.135.220.15]:32868 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751618AbdF0MD0 (ORCPT ); Tue, 27 Jun 2017 08:03:26 -0400 Date: Tue, 27 Jun 2017 14:03:17 +0200 From: Michal Hocko To: Tetsuo Handa Cc: linux-mm@kvack.org, rientjes@google.com, oleg@redhat.com, andrea@kernel.org, akpm@linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH] mm, oom: allow oom reaper to race with exit_mmap Message-ID: <20170627120317.GL28072@dhcp22.suse.cz> References: <20170626130346.26314-1-mhocko@kernel.org> <201706271952.FEB21375.SFJFHOQLOtVOMF@I-love.SAKURA.ne.jp> <20170627112650.GK28072@dhcp22.suse.cz> <201706272039.HGG51520.QOMHFVOFtOSJFL@I-love.SAKURA.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201706272039.HGG51520.QOMHFVOFtOSJFL@I-love.SAKURA.ne.jp> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 638 Lines: 17 On Tue 27-06-17 20:39:28, Tetsuo Handa wrote: > Michal Hocko wrote: > > > I wonder why you prefer timeout based approach. Your patch will after all > > > set MMF_OOM_SKIP if operations between down_write() and up_write() took > > > more than one second. > > > > if we reach down_write then we have unmapped the address space in > > exit_mmap and oom reaper cannot do much more. > > So, by the time down_write() is called, majority of memory is already released, isn't it? In most cases yes. To be put it in other words. By the time exit_mmap takes down_write there is nothing more oom reaper could reclaim. -- Michal Hocko SUSE Labs