From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751919AbcGOVWF (ORCPT ); Fri, 15 Jul 2016 17:22:05 -0400 Received: from mail-pa0-f46.google.com ([209.85.220.46]:33520 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751430AbcGOVWD (ORCPT ); Fri, 15 Jul 2016 17:22:03 -0400 Date: Fri, 15 Jul 2016 14:21:54 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Mikulas Patocka cc: Tetsuo Handa , mhocko@kernel.org, okozina@redhat.com, jmarchan@redhat.com, skozina@redhat.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: System freezes after OOM In-Reply-To: Message-ID: References: <20160713133955.GK28723@dhcp22.suse.cz> <20160713145638.GM28723@dhcp22.suse.cz> <201607142001.BJD07258.SMOHFOJVtLFOQF@I-love.SAKURA.ne.jp> 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 Fri, 15 Jul 2016, Mikulas Patocka wrote: > > Umm, show me an explicit guarantee where the oom reaper will free memory > > such that other threads may return memory to this process's mempool so it > > can make forward progress in mempool_alloc() without the need of utilizing > > memory reserves. First, it might be helpful to show that the oom reaper > > is ever guaranteed to free any memory for a selected oom victim. > > The function mempool_alloc sleeps with "io_schedule_timeout(5*HZ);" > > So, if the oom reaper frees some memory into the page allocator, the > process that is stuck in mempoo_alloc will sleep for up to 5 seconds, then > it will retry the allocation with "element = pool->alloc(gfp_temp, > pool->pool_data)" (that will allocate from the page allocator) and succed. > No, the state of the 4.7 oom killer does not explicitly guarantee any memory freeing of the victim and there is no guarantee that elements will be returned to the mempool. If you're talking about patches that you're proposing for the 4.8 merge window, please post them with complete changelogs. Thanks.