Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751315AbdCQV0Q (ORCPT ); Fri, 17 Mar 2017 17:26:16 -0400 Received: from gum.cmpxchg.org ([85.214.110.215]:40952 "EHLO gum.cmpxchg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751047AbdCQV0M (ORCPT ); Fri, 17 Mar 2017 17:26:12 -0400 Date: Fri, 17 Mar 2017 16:00:23 -0400 From: Johannes Weiner To: Michal Hocko Cc: Yisheng Xie , akpm@linux-foundation.org, mgorman@suse.de, vbabka@suse.cz, riel@redhat.com, shakeelb@google.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, guohanjun@huawei.com, qiuxishi@huawei.com Subject: Re: [PATCH v4] mm/vmscan: more restrictive condition for retry in do_try_to_free_pages Message-ID: <20170317200023.GA16939@cmpxchg.org> References: <1489577808-19228-1-git-send-email-xieyisheng1@huawei.com> <20170317183928.GA12281@cmpxchg.org> <20170317184527.GC23957@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170317184527.GC23957@dhcp22.suse.cz> User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 723 Lines: 18 On Fri, Mar 17, 2017 at 07:45:27PM +0100, Michal Hocko wrote: > On Fri 17-03-17 14:39:28, Johannes Weiner wrote: > > On Wed, Mar 15, 2017 at 07:36:48PM +0800, Yisheng Xie wrote: > > > @@ -2808,7 +2813,7 @@ static unsigned long do_try_to_free_pages(struct zonelist *zonelist, > > > return 1; > > > > > > /* Untapped cgroup reserves? Don't OOM, retry. */ > > > - if (!sc->may_thrash) { > > > + if (sc->memcg_low_protection && !sc->may_thrash) { > > > > if (sc->memcg_low_skipped) { > > [...] > > sc->memcg_low_reclaim = 1; > > you need to set memcg_low_skipped = 0 here, right? Otherwise we do not > have break out of the loop. Or am I missing something? Oops, you're right of course. That needs to be reset.