Skip to contentSkip to conversation

mm-compact-fix-zoneindex-in-compact.patch removed from -mm tree

merged [email protected] 1 participant 1 message May 23, 2016 Stable branch

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: mm/compaction.c: fix zoneindex in kcompactd()
has been removed from the -mm tree. Its filename was
mm-compact-fix-zoneindex-in-compact.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Chen Feng <[email protected]>
Subject: mm/compaction.c: fix zoneindex in kcompactd()

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 <=.

It fixes a regression where kswapd could previously compact, but kcompactd not. Not a crash fix though.

[[email protected]: fix kcompactd_do_work() as well, per Hugh]
Fixes accf62422b3a ("mm, kswapd: replace kswapd compaction with waking up kcompactd")
Cc Hugh Dickins <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Kirill A. Shutemov <[email protected]>
Cc Johannes Weiner <[email protected]>
Cc Tejun Heo <[email protected]>
Cc Zhuangluan Su <[email protected]>
Cc Yiping Xu <[email protected]>

---

 mm/compaction.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
mm/compaction.c renamed from mm/compaction.c~mm-compact-fix-zoneindex-in-compact +2 -2
diff -puN mm/compaction.c~mm-compact-fix-zoneindex-in-compact mm/compaction.c
@@ -1862,7 +1862,7 @@ static bool kcompactd_node_suitable(pg_d
 	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))
@@ -1897,7 +1897,7 @@ static void kcompactd_do_work(pg_data_t
 							cc.classzone_idx);
 	count_vm_event(KCOMPACTD_WAKE);
 
-	for (zoneid = 0; zoneid < cc.classzone_idx; zoneid++) {
+	for (zoneid = 0; zoneid <= cc.classzone_idx; zoneid++) {
 		int status;
 
 		zone = &pgdat->node_zones[zoneid];

_

Patches currently in -mm which might be from [email protected] are