Skip to contentSkip to conversation

mm-memcontrol-make-the-walk_page_range-limit-obvious.patch removed from -mm tree

merged [email protected] 1 participant 1 message Oct 10, 2016

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: mm/memcontrol.c: make the walk_page_range() limit obvious
has been removed from the -mm tree. Its filename was
mm-memcontrol-make-the-walk_page_range-limit-obvious.patch

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

------------------------------------------------------
From: James Morse <[email protected]>
Subject: mm/memcontrol.c: make the walk_page_range() limit obvious

mem_cgroup_count_precharge() and mem_cgroup_move_charge() both call walk_page_range() on the range 0 to ~0UL, neither provide a pte_hole callback, which causes the current implementation to skip non-vma regions. This is all fine but follow up changes would like to make walk_page_range more generic so it is better to be explicit about which range to traverse so let's use highest_vm_end to explicitly traverse only user mmaped memory.

---

 mm/memcontrol.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
mm/memcontrol.c renamed from mm/memcontrol.c~mm-memcontrol-make-the-walk_page_range-limit-obvious +4 -2
diff -puN mm/memcontrol.c~mm-memcontrol-make-the-walk_page_range-limit-obvious mm/memcontrol.c
@@ -4681,7 +4681,8 @@ static unsigned long mem_cgroup_count_pr
 		.mm = mm,
 	};
 	down_read(&mm->mmap_sem);
-	walk_page_range(0, ~0UL, &mem_cgroup_count_precharge_walk);
+	walk_page_range(0, mm->highest_vm_end,
+			&mem_cgroup_count_precharge_walk);
 	up_read(&mm->mmap_sem);
 
 	precharge = mc.precharge;
@@ -4969,7 +4970,8 @@ retry:
 	 * When we have consumed all precharges and failed in doing
 	 * additional charge, the page walk just aborts.
 	 */
-	walk_page_range(0, ~0UL, &mem_cgroup_move_charge_walk);
+	walk_page_range(0, mc.mm->highest_vm_end, &mem_cgroup_move_charge_walk);
+
 	up_read(&mc.mm->mmap_sem);
 	atomic_dec(&mc.from->moving_account);
 }

_

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