* [PATCH] mm: compact: fix zoneindex in compact
@ 2016-05-19 11:58 Chen Feng
2016-05-19 12:11 ` Vlastimil Babka
0 siblings, 1 reply; 7+ messages in thread
From: Chen Feng @ 2016-05-19 11:58 UTC (permalink / raw)
To: puck.chen, mhocko, kirill.shutemov, vbabka, hannes, tj, linux-mm,
linux-kernel
Cc: suzhuangluan, dan.zhao, qijiwen, xuyiping, oliver.fu, puck.chen
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>
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] mm: compact: fix zoneindex in compact
2016-05-19 11:58 [PATCH] mm: compact: fix zoneindex in compact Chen Feng
@ 2016-05-19 12:11 ` Vlastimil Babka
2016-05-19 12:13 ` Vlastimil Babka
0 siblings, 1 reply; 7+ messages in thread
From: Vlastimil Babka @ 2016-05-19 12:11 UTC (permalink / raw)
To: Chen Feng, mhocko, kirill.shutemov, hannes, tj, linux-mm,
linux-kernel, Andrew Morton
Cc: suzhuangluan, dan.zhao, qijiwen, xuyiping, oliver.fu, puck.chen
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")
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>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mm: compact: fix zoneindex in compact
2016-05-19 12:11 ` Vlastimil Babka
@ 2016-05-19 12:13 ` Vlastimil Babka
2016-05-19 17:23 ` Hugh Dickins
0 siblings, 1 reply; 7+ messages in thread
From: Vlastimil Babka @ 2016-05-19 12:13 UTC (permalink / raw)
To: Chen Feng, mhocko, kirill.shutemov, hannes, tj, linux-mm,
linux-kernel, Andrew Morton
Cc: suzhuangluan, dan.zhao, qijiwen, xuyiping, oliver.fu, puck.chen
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>
>
--
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>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mm: compact: fix zoneindex in compact
2016-05-19 12:13 ` Vlastimil Babka
@ 2016-05-19 17:23 ` Hugh Dickins
2016-05-19 17:45 ` Vlastimil Babka
0 siblings, 1 reply; 7+ messages in thread
From: Hugh Dickins @ 2016-05-19 17:23 UTC (permalink / raw)
To: Vlastimil Babka
Cc: Chen Feng, mhocko, kirill.shutemov, hannes, tj, linux-mm,
linux-kernel, Andrew Morton, suzhuangluan, dan.zhao, qijiwen,
xuyiping, oliver.fu, puck.chen
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>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mm: compact: fix zoneindex in compact
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
0 siblings, 2 replies; 7+ messages in thread
From: Vlastimil Babka @ 2016-05-19 17:45 UTC (permalink / raw)
To: Hugh Dickins
Cc: Chen Feng, mhocko, kirill.shutemov, hannes, tj, linux-mm,
linux-kernel, Andrew Morton, suzhuangluan, dan.zhao, qijiwen,
xuyiping, oliver.fu, puck.chen
On 19.5.2016 19:23, Hugh Dickins wrote:
> 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:
You spelled "Important" wrong.
> should that one be saying "zoneid <= cc.classzone_idx" too?
Yes. Chen, can you send updated patch (also with the ack/cc/fixes tags I added?)
Thanks!
> 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>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mm: compact: fix zoneindex in compact
2016-05-19 17:45 ` Vlastimil Babka
@ 2016-05-20 1:00 ` Chen Feng
2016-05-20 1:30 ` Chen Feng
1 sibling, 0 replies; 7+ messages in thread
From: Chen Feng @ 2016-05-20 1:00 UTC (permalink / raw)
To: Vlastimil Babka, Hugh Dickins
Cc: mhocko, kirill.shutemov, hannes, tj, linux-mm, linux-kernel,
Andrew Morton, suzhuangluan, dan.zhao, qijiwen, xuyiping,
oliver.fu, puck.chen
On 2016/5/20 1:45, Vlastimil Babka wrote:
> On 19.5.2016 19:23, Hugh Dickins wrote:
>> 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:
>
Yes, my mistake.
> You spelled "Important" wrong.
>
>> should that one be saying "zoneid <= cc.classzone_idx" too?
>
> Yes. Chen, can you send updated patch (also with the ack/cc/fixes tags I added?)
>
OK, I will send it out soon.
> Thanks!
>
>> 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>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mm: compact: fix zoneindex in compact
2016-05-19 17:45 ` Vlastimil Babka
2016-05-20 1:00 ` Chen Feng
@ 2016-05-20 1:30 ` Chen Feng
1 sibling, 0 replies; 7+ messages in thread
From: Chen Feng @ 2016-05-20 1:30 UTC (permalink / raw)
To: Vlastimil Babka, Hugh Dickins
Cc: mhocko, kirill.shutemov, hannes, tj, linux-mm, linux-kernel,
Andrew Morton, suzhuangluan, dan.zhao, qijiwen, xuyiping,
oliver.fu, puck.chen
On 2016/5/20 1:45, Vlastimil Babka wrote:
> On 19.5.2016 19:23, Hugh Dickins wrote:
>> 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:
>
> You spelled "Important" wrong.
>
>> should that one be saying "zoneid <= cc.classzone_idx" too?
>
> Yes. Chen, can you send updated patch (also with the ack/cc/fixes tags I added?)
>
kcompactd_do_work()
This fix already added by Andrew Morton <akpm@linux-foundation.org>
I will not sent it.
> Thanks!
>
>> 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>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-05-20 1:32 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-19 11:58 [PATCH] mm: compact: fix zoneindex in compact Chen Feng
2016-05-19 12:11 ` 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
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).