提交 fda3d69b 编写于 作者: M Michal Hocko 提交者: Linus Torvalds

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: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 4ee815be
...@@ -1391,10 +1391,9 @@ int mem_cgroup_select_victim_node(struct mem_cgroup *memcg) ...@@ -1391,10 +1391,9 @@ int mem_cgroup_select_victim_node(struct mem_cgroup *memcg)
node = next_node_in(node, memcg->scan_nodes); node = next_node_in(node, memcg->scan_nodes);
/* /*
* We call this when we hit limit, not when pages are added to LRU. * mem_cgroup_may_update_nodemask might have seen no reclaimmable pages
* No LRU may hold pages because all pages are UNEVICTABLE or * last time it really checked all the LRUs due to rate limiting.
* memcg is too small and all pages are not on LRU. In that case, * Fallback to the current node in that case for simplicity.
* we use curret node.
*/ */
if (unlikely(node == MAX_NUMNODES)) if (unlikely(node == MAX_NUMNODES))
node = numa_node_id(); node = numa_node_id();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册