aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/mempolicy.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index 44dd9d1521ec..bda230e52acd 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -888,36 +888,36 @@ int do_migrate_pages(struct mm_struct *mm,
888 if (err) 888 if (err)
889 goto out; 889 goto out;
890 890
891/* 891 /*
892 * Find a 'source' bit set in 'tmp' whose corresponding 'dest' 892 * Find a 'source' bit set in 'tmp' whose corresponding 'dest'
893 * bit in 'to' is not also set in 'tmp'. Clear the found 'source' 893 * bit in 'to' is not also set in 'tmp'. Clear the found 'source'
894 * bit in 'tmp', and return that <source, dest> pair for migration. 894 * bit in 'tmp', and return that <source, dest> pair for migration.
895 * The pair of nodemasks 'to' and 'from' define the map. 895 * The pair of nodemasks 'to' and 'from' define the map.
896 * 896 *
897 * If no pair of bits is found that way, fallback to picking some 897 * If no pair of bits is found that way, fallback to picking some
898 * pair of 'source' and 'dest' bits that are not the same. If the 898 * pair of 'source' and 'dest' bits that are not the same. If the
899 * 'source' and 'dest' bits are the same, this represents a node 899 * 'source' and 'dest' bits are the same, this represents a node
900 * that will be migrating to itself, so no pages need move. 900 * that will be migrating to itself, so no pages need move.
901 * 901 *
902 * If no bits are left in 'tmp', or if all remaining bits left 902 * If no bits are left in 'tmp', or if all remaining bits left
903 * in 'tmp' correspond to the same bit in 'to', return false 903 * in 'tmp' correspond to the same bit in 'to', return false
904 * (nothing left to migrate). 904 * (nothing left to migrate).
905 * 905 *
906 * This lets us pick a pair of nodes to migrate between, such that 906 * This lets us pick a pair of nodes to migrate between, such that
907 * if possible the dest node is not already occupied by some other 907 * if possible the dest node is not already occupied by some other
908 * source node, minimizing the risk of overloading the memory on a 908 * source node, minimizing the risk of overloading the memory on a
909 * node that would happen if we migrated incoming memory to a node 909 * node that would happen if we migrated incoming memory to a node
910 * before migrating outgoing memory source that same node. 910 * before migrating outgoing memory source that same node.
911 * 911 *
912 * A single scan of tmp is sufficient. As we go, we remember the 912 * A single scan of tmp is sufficient. As we go, we remember the
913 * most recent <s, d> pair that moved (s != d). If we find a pair 913 * most recent <s, d> pair that moved (s != d). If we find a pair
914 * that not only moved, but what's better, moved to an empty slot 914 * that not only moved, but what's better, moved to an empty slot
915 * (d is not set in tmp), then we break out then, with that pair. 915 * (d is not set in tmp), then we break out then, with that pair.
916 * Otherwise when we finish scannng from_tmp, we at least have the 916 * Otherwise when we finish scannng from_tmp, we at least have the
917 * most recent <s, d> pair that moved. If we get all the way through 917 * most recent <s, d> pair that moved. If we get all the way through
918 * the scan of tmp without finding any node that moved, much less 918 * the scan of tmp without finding any node that moved, much less
919 * moved to an empty node, then there is nothing left worth migrating. 919 * moved to an empty node, then there is nothing left worth migrating.
920 */ 920 */
921 921
922 tmp = *from_nodes; 922 tmp = *from_nodes;
923 while (!nodes_empty(tmp)) { 923 while (!nodes_empty(tmp)) {