summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/migrate.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/mm/migrate.c b/mm/migrate.c
index 9d2642a34018..f50087d3ebf2 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -1206,6 +1206,14 @@ int next_demotion_node(int node)
/*
* If there are multiple target nodes, just select one
* target node randomly.
+ *
+ * In addition, we can also use round-robin to select
+ * target node, but we should introduce another variable
+ * for node_demotion[] to record last selected target node,
+ * that may cause cache ping-pong due to the changing of
+ * last target node. Or introducing per-cpu data to avoid
+ * caching issue, which seems more complicated. So selecting
+ * target node randomly seems better until now.
*/
index = get_random_int() % target_nr;
break;