From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932475AbcBZNt0 (ORCPT ); Fri, 26 Feb 2016 08:49:26 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:35534 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753896AbcBZNtY (ORCPT ); Fri, 26 Feb 2016 08:49:24 -0500 Date: Fri, 26 Feb 2016 14:49:20 +0100 From: Michal Hocko To: Hillf Danton Cc: "'Hugh Dickins'" , "'Andrew Morton'" , "'Linus Torvalds'" , "'Johannes Weiner'" , "'Mel Gorman'" , "'David Rientjes'" , "'Tetsuo Handa'" , "'KAMEZAWA Hiroyuki'" , linux-mm@kvack.org, "'LKML'" , "'Sergey Senozhatsky'" Subject: Re: [PATCH 0/3] OOM detection rework v4 Message-ID: <20160226134920.GA18200@dhcp22.suse.cz> References: <1450203586-10959-1-git-send-email-mhocko@kernel.org> <20160203132718.GI6757@dhcp22.suse.cz> <20160225092315.GD17573@dhcp22.suse.cz> <009a01d1706a$e666dc00$b3349400$@alibaba-inc.com> <20160226092406.GB8940@dhcp22.suse.cz> <00bd01d17080$445ceb00$cd16c100$@alibaba-inc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <00bd01d17080$445ceb00$cd16c100$@alibaba-inc.com> 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 On Fri 26-02-16 18:27:16, Hillf Danton wrote: > >> > > > --- a/mm/page_alloc.c Thu Feb 25 15:43:18 2016 > > > +++ b/mm/page_alloc.c Fri Feb 26 15:18:55 2016 > > > @@ -3113,6 +3113,8 @@ should_reclaim_retry(gfp_t gfp_mask, uns > > > struct zone *zone; > > > struct zoneref *z; > > > > > > + if (order <= PAGE_ALLOC_COSTLY_ORDER) > > > + return true; > > > > This is defeating the whole purpose of the rework - to behave > > deterministically. You have just disabled the oom killer completely. > > This is not the way to go > > > Then in another direction, below is what I can do. > > thanks > Hillf > --- a/mm/page_alloc.c Thu Feb 25 15:43:18 2016 > +++ b/mm/page_alloc.c Fri Feb 26 18:14:59 2016 > @@ -3366,8 +3366,11 @@ retry: > no_progress_loops++; > > if (should_reclaim_retry(gfp_mask, order, ac, alloc_flags, > - did_some_progress > 0, no_progress_loops)) > + did_some_progress > 0, no_progress_loops)) { > + /* Burn more cycles if any zone seems to satisfy our request */ > + no_progress_loops /= 2; No, I do not think this makes any sense. If we need more retry loops then we can do it by increasing MAX_RECLAIM_RETRIES. > goto retry; > + } > > /* Reclaim has failed us, start killing things */ > page = __alloc_pages_may_oom(gfp_mask, order, ac, &did_some_progress); -- Michal Hocko SUSE Labs