From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932147AbdJJMsD (ORCPT ); Tue, 10 Oct 2017 08:48:03 -0400 Received: from gum.cmpxchg.org ([85.214.110.215]:54178 "EHLO gum.cmpxchg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751415AbdJJMsA (ORCPT ); Tue, 10 Oct 2017 08:48:00 -0400 Date: Tue, 10 Oct 2017 08:47:49 -0400 From: Johannes Weiner To: Tetsuo Handa Cc: akpm@linux-foundation.org, alan@llwyncelyn.cymru, hch@lst.de, mhocko@suse.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH] vmalloc: back off only when the current task is OOM killed Message-ID: <20171010124749.GA16710@cmpxchg.org> References: <1507633133-5720-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1507633133-5720-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 10, 2017 at 07:58:53PM +0900, Tetsuo Handa wrote: > Commit 5d17a73a2ebeb8d1 ("vmalloc: back off when the current task is > killed") revealed two bugs [1] [2] that were not ready to fail vmalloc() > upon SIGKILL. But since the intent of that commit was to avoid unlimited > access to memory reserves, we should have checked tsk_is_oom_victim() > rather than fatal_signal_pending(). > > Note that even with commit cd04ae1e2dc8e365 ("mm, oom: do not rely on > TIF_MEMDIE for memory reserves access"), it is possible to trigger > "complete depletion of memory reserves" and "extra OOM kills due to > depletion of memory reserves" by doing a large vmalloc() request if commit > 5d17a73a2ebeb8d1 is reverted. Thus, let's keep checking tsk_is_oom_victim() > rather than removing fatal_signal_pending(). Nothing has changed since the last time you proposed this. Who is doing large vmallocs, and why shouldn't we annotate what's special instead of littering generic code with checks for unlikely events?