Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 356628
b: refs/heads/master
c: b599cbd
h: refs/heads/master
v: v3
  • Loading branch information
Hugh Dickins authored and Linus Torvalds committed Feb 24, 2013
1 parent 1b71dea commit dde2c57
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8fdb3dbf02335d96bf170321381522709ba63a0c
refs/heads/master: b599cbdf1c2d88eac7caed00854ee4eecb119a6b
19 changes: 9 additions & 10 deletions trunk/mm/ksm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1342,16 +1342,6 @@ struct rmap_item *unstable_tree_search_insert(struct rmap_item *rmap_item,
return NULL;
}

/*
* If tree_page has been migrated to another NUMA node, it
* will be flushed out and put into the right unstable tree
* next time: only merge with it if merge_across_nodes.
*/
if (!ksm_merge_across_nodes && page_to_nid(tree_page) != nid) {
put_page(tree_page);
return NULL;
}

ret = memcmp_pages(page, tree_page);

parent = *new;
Expand All @@ -1361,6 +1351,15 @@ struct rmap_item *unstable_tree_search_insert(struct rmap_item *rmap_item,
} else if (ret > 0) {
put_page(tree_page);
new = &parent->rb_right;
} else if (!ksm_merge_across_nodes &&
page_to_nid(tree_page) != nid) {
/*
* If tree_page has been migrated to another NUMA node,
* it will be flushed out and put in the right unstable
* tree next time: only merge with it when across_nodes.
*/
put_page(tree_page);
return NULL;
} else {
*tree_pagep = tree_page;
return tree_rmap_item;
Expand Down

0 comments on commit dde2c57

Please sign in to comment.