Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 308837
b: refs/heads/master
c: 4a5b18c
h: refs/heads/master
i:
  308835: 8d31076
v: v3
  • Loading branch information
Larry Woodman authored and Linus Torvalds committed May 29, 2012
1 parent 65d551c commit ac26583
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1f1d06c34f7675026326cd9f39ff91e4555cf355
refs/heads/master: 4a5b18cc1971046d9ca3a29fdcafbe5648629585
20 changes: 20 additions & 0 deletions trunk/mm/mempolicy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1005,6 +1005,26 @@ int do_migrate_pages(struct mm_struct *mm,
int dest = 0;

for_each_node_mask(s, tmp) {

/*
* do_migrate_pages() tries to maintain the relative
* node relationship of the pages established between
* threads and memory areas.
*
* However if the number of source nodes is not equal to
* the number of destination nodes we can not preserve
* this node relative relationship. In that case, skip
* copying memory from a node that is in the destination
* mask.
*
* Example: [2,3,4] -> [3,4,5] moves everything.
* [0-7] - > [3,4,5] moves only 0,1,2,6,7.
*/

if ((nodes_weight(*from_nodes) != nodes_weight(*to_nodes)) &&
(node_isset(s, *to_nodes)))
continue;

d = node_remap(s, *from_nodes, *to_nodes);
if (s == d)
continue;
Expand Down

0 comments on commit ac26583

Please sign in to comment.