mm: compact: fix zoneindex in compact
Subsystems (2)
PATCH 1/1 mm: compact: fix zoneindex in compact
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 <=.
--- mm/compaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/compaction.c +1 -1
@@ -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))
Signature · 7 lines
1.9.1 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 3 lines · Chen Feng
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!
Quoted 1 line
Signed-off-by Chen Feng <[email protected]>
Quoted 10 lines
--- mm/compaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)mm/compaction.c +0
-0
mm/compaction.c static bool kcompactd_node_suitable(pg_data_t *pgdat) · line 1748
Quoted 8 lines
mm/compaction.c +1
-1@@ -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 [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 10 lines · Vlastimil Babka
Quoted 3 lines · Chen Feng
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!
Quoted 1 line
Signed-off-by Chen Feng <[email protected]>Fixes 0f87baf4f7fb ("mm: wake kcompactd before kswapd's short sleep")
Bah, not that one.
up kcompactd")
Quoted 19 lines
Quoted 16 lines
--- mm/compaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)mm/compaction.c +1
-1@@ -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];
Quoted 9 lines
mm/compaction.c static bool kcompactd_node_suitable(pg_data_t *pgdat) · line 1748
Quoted 2 lines
mm/compaction.c +0
-0if (!populated_zone (zone))--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 32 lines · Vlastimil Babka
Quoted 10 lines · Vlastimil Babka
Quoted 3 lines · Chen Feng
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!
Quoted 1 line
Signed-off-by Chen Feng <[email protected]>Fixes 0f87baf4f7fb ("mm: wake kcompactd before kswapd's short sleep")Bah, not that one.
Fixes accf62422b3a ("mm, kswapd: replace kswapd compaction with wakingup kcompactd")
Quoted 15 lines
Quoted 12 lines
--- mm/compaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)mm/compaction.c +0
-0@@ -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;
Quoted 5 lines
Quoted 5 lines
mm/compaction.c static bool kcompactd_node_suitable(pg_data_t *pgdat) · line 1748
Quoted 5 lines
mm/compaction.c +1
-1-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 [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 33 lines · Hugh Dickins
Quoted 32 lines · Vlastimil Babka
Quoted 10 lines · Vlastimil Babka
Quoted 3 lines · Chen Feng
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!
Quoted 1 line
Signed-off-by Chen Feng <[email protected]>Fixes 0f87baf4f7fb ("mm: wake kcompactd before kswapd's short sleep")Bah, not that one.
Fixes accf62422b3a ("mm, kswapd: replace kswapd compaction with wakingup kcompactd")
Quoted 15 lines
Quoted 12 lines
--- mm/compaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)mm/compaction.c +0
-0@@ -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;
Quoted 7 lines
Quoted 5 lines
Quoted 5 lines
mm/compaction.c static bool kcompactd_node_suitable(pg_data_t *pgdat) · line 1748
Quoted 5 lines
mm/compaction.c +1
-1-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.
Quoted 1 line
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!
Quoted 2 lines
Hugh
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 34 lines · Vlastimil Babka
Quoted 33 lines · Hugh Dickins
Quoted 32 lines · Vlastimil Babka
Quoted 10 lines · Vlastimil Babka
Quoted 3 lines · Chen Feng
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!
Quoted 1 line
Signed-off-by Chen Feng <[email protected]>Fixes 0f87baf4f7fb ("mm: wake kcompactd before kswapd's short sleep")Bah, not that one.
Fixes accf62422b3a ("mm, kswapd: replace kswapd compaction with wakingup kcompactd")
Quoted 15 lines
Quoted 12 lines
--- mm/compaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)mm/compaction.c +0
-0@@ -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;
Quoted 8 lines
Quoted 7 lines
Quoted 5 lines
Quoted 5 lines
mm/compaction.c static bool kcompactd_node_suitable(pg_data_t *pgdat) · line 1748
Quoted 5 lines
mm/compaction.c +1
-1-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.
Quoted 6 lines
You spelled "Important" wrong.
Quoted 1 line
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.
Quoted 8 lines
Thanks!
Quoted 2 lines
Hugh
.
Quoted 42 lines · Vlastimil Babka
Quoted 33 lines · Hugh Dickins
Quoted 32 lines · Vlastimil Babka
Quoted 10 lines · Vlastimil Babka
Quoted 3 lines · Chen Feng
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!
Quoted 1 line
Signed-off-by Chen Feng <[email protected]>Fixes 0f87baf4f7fb ("mm: wake kcompactd before kswapd's short sleep")Bah, not that one.
Fixes accf62422b3a ("mm, kswapd: replace kswapd compaction with wakingup kcompactd")
Quoted 15 lines
Quoted 12 lines
--- mm/compaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)mm/compaction.c +0
-0@@ -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;Quoted 7 lines
Quoted 5 lines
Quoted 5 lines
mm/compaction.c static bool kcompactd_node_suitable(pg_data_t *pgdat) · line 1748
Quoted 5 lines
mm/compaction.c +1
-1-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:
Quoted 6 lines
You spelled "Important" wrong.
Quoted 1 line
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 <[email protected]>
I will not sent it.
Quoted 8 lines
Thanks!
Quoted 2 lines
Hugh
.