summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorMichal Hocko <mhocko@kernel.org>2016-05-19 17:11:34 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-05-19 19:12:14 -0700
commitfda3d69be9fe7a24ad32b840cb2ed7c30b6ba1c9 (patch)
tree573d6c40ed432dccaad8c8fb77ff5b2781150462 /mm
parent4ee815be1d34a6f254b3d09bdebcb27f294f2bd3 (diff)
downloadlinux-fda3d69be9fe7a24ad32b840cb2ed7c30b6ba1c9.tar.bz2
mm/memcontrol.c:mem_cgroup_select_victim_node(): clarify comment
> The comment seems to have not much to do with the code? I guess the comment tries to say that the code path is triggered when we charge the page which happens _before_ it is added to the LRU list and so last_scanned_node might contain the stale data. Cc: Johannes Weiner <hannes@cmpxchg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/memcontrol.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 6740c4c2b550..011dac8ab5d7 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1391,10 +1391,9 @@ int mem_cgroup_select_victim_node(struct mem_cgroup *memcg)
node = next_node_in(node, memcg->scan_nodes);
/*
- * We call this when we hit limit, not when pages are added to LRU.
- * No LRU may hold pages because all pages are UNEVICTABLE or
- * memcg is too small and all pages are not on LRU. In that case,
- * we use curret node.
+ * mem_cgroup_may_update_nodemask might have seen no reclaimmable pages
+ * last time it really checked all the LRUs due to rate limiting.
+ * Fallback to the current node in that case for simplicity.
*/
if (unlikely(node == MAX_NUMNODES))
node = numa_node_id();