Skip to contentSkip to conversation

mm/mpol: Lazy migrate a process/vma

tip:sched/numa tip-bot for Peter Zijlstra 2 participants 2 messages May 18, 2012 – May 21, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw
Commit-ID:  e9941dae870861da410835560b603d17c43dabee
Gitweb:     http://git.kernel.org/tip/e9941dae870861da410835560b603d17c43dabee
Author:     Peter Zijlstra <[email protected]>
AuthorDate: Sat, 3 Mar 2012 17:06:25 +0100
Committer:  Ingo Molnar <[email protected]>
CommitDate: Fri, 18 May 2012 08:16:21 +0200

mm/mpol: Lazy migrate a process/vma

Provide simple functions to lazy migrate a process (or part thereof). These will be used to implement memory migration for NUMA process migration.

Cc Suresh Siddha <[email protected]>
Cc Paul Turner <[email protected]>
Cc Dan Smith <[email protected]>
Cc Bharata B Rao <[email protected]>
Cc Lee Schermerhorn <[email protected]>
Cc Christoph Lameter <[email protected]>
Cc Rik van Riel <[email protected]>
Cc Andrea Arcangeli <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Linus Torvalds <[email protected]>
---
 include/linux/mempolicy.h |    3 ++
 mm/mempolicy.c            |   84 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 87 insertions(+), 0 deletions(-)
include/linux/mempolicy.h +3 -0
index 578fcd0..af2983b 100644
@@ -262,6 +262,9 @@ extern int vma_migratable(struct vm_area_struct *);
 
 extern int mpol_misplaced(struct page *, struct vm_area_struct *, unsigned long);
 
+extern void lazy_migrate_vma(struct vm_area_struct *vma, int node);
+extern void lazy_migrate_process(struct mm_struct *mm, int node);
+
 #else
 
 struct mempolicy {};
mm/mempolicy.c +84 -0

90 lines not on this page · raw message

#1 lore raw

mm/mempolicy.c static long do_mbind(unsigned long start, unsigned long len, · line 1230

Quoted 10 lines · tip-bot for Peter Zijlstra
mm/mempolicy.c +10 -0
+
+	/*
+	 * Obtain a more-or-less correct nodemask to find which pages we need
+	 * to unmap so that MoF can put them right again.
+	 *
+	 * Not quite correct for INTERLEAVE, that would need us doing
+	 * offset_il_node() from check_pte_entry().
+	 *
+	 * Also not quite correct for task policies since we don't have a task,
+	 * approximate by having @node function as local / task-home-node.

Hmm, so this destroys existing numa policies for already running processes?

Andrea's original THP had a similar problem, and it caused serious performance problems before it was fixed.

I also seem to miss the benchmark numbers justifying all that code.

-Andi

Signature · 1 line
[email protected] -- Speaking for myself only