From patchwork Thu May 19 11:58:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Feng X-Patchwork-Id: 68123 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp3156299qge; Thu, 19 May 2016 04:59:17 -0700 (PDT) X-Received: by 10.98.95.4 with SMTP id t4mr19045822pfb.162.1463659156671; Thu, 19 May 2016 04:59:16 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x63si4451205pfb.123.2016.05.19.04.59.16; Thu, 19 May 2016 04:59:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754668AbcESL7O (ORCPT + 29 others); Thu, 19 May 2016 07:59:14 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:46199 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751942AbcESL7N (ORCPT ); Thu, 19 May 2016 07:59:13 -0400 Received: from 172.24.1.47 (EHLO szxeml431-hub.china.huawei.com) ([172.24.1.47]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id CBX62913; Thu, 19 May 2016 19:58:51 +0800 (CST) Received: from vm163-62.huawei.com (10.184.163.62) by szxeml431-hub.china.huawei.com (10.82.67.208) with Microsoft SMTP Server id 14.3.235.1; Thu, 19 May 2016 19:58:42 +0800 From: Chen Feng To: , , , , , , , CC: , , , , , Subject: [PATCH] mm: compact: fix zoneindex in compact Date: Thu, 19 May 2016 19:58:41 +0800 Message-ID: <1463659121-84124-1-git-send-email-puck.chen@hisilicon.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [10.184.163.62] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090202.573DAA7F.003E, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: d374ddf82c4b15657eef7c3a1b296259 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org While testing the kcompactd in my platform 3G MEM only DMA ZONE. I found the kcompactd never wakeup. It seems the zoneindex has already minus 1 before. So the traverse here should be <=. Signed-off-by: Chen Feng --- mm/compaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.9.1 diff --git a/mm/compaction.c b/mm/compaction.c index 8fa2540..e5122d9 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -1742,7 +1742,7 @@ static bool kcompactd_node_suitable(pg_data_t *pgdat) struct zone *zone; enum zone_type classzone_idx = pgdat->kcompactd_classzone_idx; - for (zoneid = 0; zoneid < classzone_idx; zoneid++) { + for (zoneid = 0; zoneid <= classzone_idx; zoneid++) { zone = &pgdat->node_zones[zoneid]; if (!populated_zone(zone))