Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754246AbcCIWaP (ORCPT ); Wed, 9 Mar 2016 17:30:15 -0500 Received: from gum.cmpxchg.org ([85.214.110.215]:45540 "EHLO gum.cmpxchg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754085AbcCIWaM (ORCPT ); Wed, 9 Mar 2016 17:30:12 -0500 Date: Wed, 9 Mar 2016 17:30:00 -0500 From: Johannes Weiner To: Andrew Morton Cc: Michal Hocko , linux-mm@kvack.org, Tetsuo Handa , David Rientjes , LKML , Michal Hocko Subject: Re: [PATCH 2/2] oom-clear-tif_memdie-after-oom_reaper-managed-to-unmap-the-address-space-fix Message-ID: <20160309223000.GB3647@cmpxchg.org> References: <1457442737-8915-1-git-send-email-mhocko@kernel.org> <1457442737-8915-3-git-send-email-mhocko@kernel.org> <20160309132142.80d0afbf0ae398df8e2adba8@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160309132142.80d0afbf0ae398df8e2adba8@linux-foundation.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1095 Lines: 24 On Wed, Mar 09, 2016 at 01:21:42PM -0800, Andrew Morton wrote: > I found the below patch lying around but I didn't queue it properly. > Is it legit? Yeah. Michal suggested this should be its own patch, which I agree with. The subject would then be: Subject: mm: oom_kill: don't ignore oom score on exiting tasks > From: Johannes Weiner > Subject: oom-clear-tif_memdie-after-oom_reaper-managed-to-unmap-the-address-space-fix > > When the OOM killer scans tasks and encounters a PF_EXITING one, it > force-selects that one regardless of the score. Is there a possibility > that the task might hang after it has set PF_EXITING? In that case the > OOM killer should be able to move on to the next task. > > Frankly, I don't even know why we check for exiting tasks in the OOM > killer. We've tried direct reclaim at least 15 times by the time we > decide the system is OOM, there was plenty of time to exit and free > memory; and a task might exit voluntarily right after we issue a kill. > This is testing pure noise. Signed-off-by: Johannes Weiner