Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1403703

Re: [PATCH] mm: compact: fix zoneindex in compact

From Vlastimil Babka <vbabka@suse.cz>
Newsgroups linux.kernel
Subject Re: [PATCH] mm: compact: fix zoneindex in compact
Date 2016-05-19 14:20 +0200
Message-ID <rAv5L-83d-17@gated-at.bofh.it> (permalink)
References <rAuMv-7EI-23@gated-at.bofh.it> <rAv5L-83d-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] mm: compact: fix zoneindex in compact Chen Feng <puck.chen@hisilicon.com> - 2016-05-19 14:00 +0200
  Re: [PATCH] mm: compact: fix zoneindex in compact Vlastimil Babka <vbabka@suse.cz> - 2016-05-19 14:20 +0200
    Re: [PATCH] mm: compact: fix zoneindex in compact Vlastimil Babka <vbabka@suse.cz> - 2016-05-19 14:20 +0200
      Re: [PATCH] mm: compact: fix zoneindex in compact Hugh Dickins <hughd@google.com> - 2016-05-19 19:30 +0200
        Re: [PATCH] mm: compact: fix zoneindex in compact Vlastimil Babka <vbabka@suse.cz> - 2016-05-19 19:50 +0200
          Re: [PATCH] mm: compact: fix zoneindex in compact Chen Feng <puck.chen@hisilicon.com> - 2016-05-20 03:10 +0200
          Re: [PATCH] mm: compact: fix zoneindex in compact Chen Feng <puck.chen@hisilicon.com> - 2016-05-20 03:40 +0200

csiph-web