From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753301AbcEMD76 (ORCPT ); Thu, 12 May 2016 23:59:58 -0400 Received: from out4133-34.mail.aliyun.com ([42.120.133.34]:7832 "EHLO out4133-34.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752309AbcEMD75 (ORCPT ); Thu, 12 May 2016 23:59:57 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R131e4;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e02c03284;MF=hillf.zj@alibaba-inc.com;NM=1;PH=DS;RN=12;SR=0;TI=SMTPD_----4oH1QBY_1463111968; Reply-To: "Hillf Danton" From: "Hillf Danton" To: "'Michal Hocko'" , "'Andrew Morton'" Cc: "'Linus Torvalds'" , "'Johannes Weiner'" , "'Mel Gorman'" , "'David Rientjes'" , "'Tetsuo Handa'" , "'Joonsoo Kim'" , "'Vlastimil Babka'" , , "'LKML'" , "'Michal Hocko'" References: <1463051677-29418-1-git-send-email-mhocko@kernel.org> <1463051677-29418-2-git-send-email-mhocko@kernel.org> In-Reply-To: <1463051677-29418-2-git-send-email-mhocko@kernel.org> Subject: Re: [PATCH 1/2] mmotm: mm-oom-rework-oom-detection-fix Date: Fri, 13 May 2016 11:59:28 +0800 Message-ID: <02ed01d1accb$d92e16f0$8b8a44d0$@alibaba-inc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQFWvLFVEjN1B0l39CtMPfVHi7VoCAKxjsyioJaRFtA= Content-Language: zh-cn Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > From: Michal Hocko > > watermark check should use classzone_idx rather than high_zoneidx > to check reserves against the correct (preferred) zone. > > Signed-off-by: Michal Hocko > --- Acked-by: Hillf Danton > mm/page_alloc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index 0d9008042efa..620ec002aea2 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -3496,7 +3496,7 @@ should_reclaim_retry(gfp_t gfp_mask, unsigned order, > * available? > */ > if (__zone_watermark_ok(zone, order, min_wmark_pages(zone), > - ac->high_zoneidx, alloc_flags, available)) { > + ac_classzone_idx(ac), alloc_flags, available)) { > /* > * If we didn't make any progress and have a lot of > * dirty + writeback pages then we should wait for > -- > 2.8.1