linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Hugh Dickins <hughd@google.com>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Chen Feng <puck.chen@hisilicon.com>,
	mhocko@suse.com, kirill.shutemov@linux.intel.com,
	hannes@cmpxchg.org, tj@kernel.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	suzhuangluan@hisilicon.com, dan.zhao@hisilicon.com,
	qijiwen@hisilicon.com, xuyiping@hisilicon.com,
	oliver.fu@hisilicon.com, puck.chen@foxmail.com
Subject: Re: [PATCH] mm: compact: fix zoneindex in compact
Date: Thu, 19 May 2016 10:23:46 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LSU.2.11.1605191020470.12425@eggly.anvils> (raw)
In-Reply-To: <573DADF7.4000109@suse.cz>

On Thu, 19 May 2016, Vlastimil Babka wrote:
> On 05/19/2016 02:11 PM, Vlastimil Babka wrote:
> > On 05/19/2016 01:58 PM, Chen Feng wrote:
> >> 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 <=.
> > 
> > Ouch, thanks!
> > 
> >> Signed-off-by: Chen Feng <puck.chen@hisilicon.com>
> > 
> > Fixes: 0f87baf4f7fb ("mm: wake kcompactd before kswapd's short sleep")
> 
> Bah, not that one.
> 
> Fixes: accf62422b3a ("mm, kswapd: replace kswapd compaction with waking
> up kcompactd")
> 
> > Cc: stable@vger.kernel.org
> > Acked-by: Vlastimil Babka <vbabka@suse.cz>
> > 
> >> ---
> >>  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))

Ignorant question: kcompactd_do_work() just below has a similar loop:
should that one be saying "zoneid <= cc.classzone_idx" too?

Hugh

--
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 17:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-19 11:58 Chen Feng
2016-05-19 12:11 ` Vlastimil Babka
2016-05-19 12:13   ` Vlastimil Babka
2016-05-19 17:23     ` Hugh Dickins [this message]
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=alpine.LSU.2.11.1605191020470.12425@eggly.anvils \
    --to=hughd@google.com \
    --cc=akpm@linux-foundation.org \
    --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=puck.chen@hisilicon.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