linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Chen Feng <puck.chen@hisilicon.com>
To: puck.chen@hisilicon.com, mhocko@suse.com,
	kirill.shutemov@linux.intel.com, vbabka@suse.cz,
	hannes@cmpxchg.org, tj@kernel.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Cc: suzhuangluan@hisilicon.com, dan.zhao@hisilicon.com,
	qijiwen@hisilicon.com, xuyiping@hisilicon.com,
	oliver.fu@hisilicon.com, puck.chen@foxmail.com
Subject: [PATCH] mm: compact: fix zoneindex in compact
Date: Thu, 19 May 2016 19:58:41 +0800	[thread overview]
Message-ID: <1463659121-84124-1-git-send-email-puck.chen@hisilicon.com> (raw)

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 <puck.chen@hisilicon.com>
---
 mm/compaction.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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))
-- 
1.9.1

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

             reply	other threads:[~2016-05-19 11:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-19 11:58 Chen Feng [this message]
2016-05-19 12:11 ` [PATCH] mm: compact: fix zoneindex in compact Vlastimil Babka
2016-05-19 12:13   ` Vlastimil Babka
2016-05-19 17:23     ` Hugh Dickins
2016-05-19 17:45       ` Vlastimil Babka
2016-05-20  1:00         ` Chen Feng
2016-05-20  1:30         ` Chen Feng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1463659121-84124-1-git-send-email-puck.chen@hisilicon.com \
    --to=puck.chen@hisilicon.com \
    --cc=dan.zhao@hisilicon.com \
    --cc=hannes@cmpxchg.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=oliver.fu@hisilicon.com \
    --cc=puck.chen@foxmail.com \
    --cc=qijiwen@hisilicon.com \
    --cc=suzhuangluan@hisilicon.com \
    --cc=tj@kernel.org \
    --cc=vbabka@suse.cz \
    --cc=xuyiping@hisilicon.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).