Re: [PATCH -mm] do_migrate_pages() calls migrate_to_node() even iftask is already on a correct node

From: Larry Woodman
Date: Fri Mar 30 2012 - 13:30:53 EST

On 03/30/2012 12:15 PM, Christoph Lameter wrote:
On Thu, 29 Mar 2012, KOSAKI Motohiro wrote:

for_each_node_mask(s, tmp) {
+ /* IFF there is an equal number of source and
+ * destination nodes, maintain relative node distance
+ * even when source and destination nodes overlap.
+ * However, when the node weight is unequal, never
+ * memory out of any destination nodes */
+ if ((nodes_weight(*from_nodes) !=
+ (node_isset(s, *to_nodes)))
+ continue;
d = node_remap(s, *from_nodes, *to_nodes);
if (s == d)
I'm confused. Could you please explain why you choose nodes_weight()? On my
first impression,
it seems almostly unrelated factor.
Isnt this the original code by Paul?
No, I added the test to see if the source and destination has the same number of nodes.
I would think that the 1-1 movement
is only useful to do if the number of nodes in both the destination and
the source is the same.
Agreed, thats exactly what this patch does. are you OK with this change then???


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at