Re: [PATCH v4 1/2] mm/list_lru.c: fix list_lru_count_node() to be race free

From: Vladimir Davydov
Date: Sat Jul 01 2017 - 12:29:56 EST

On Thu, Jun 29, 2017 at 09:09:15AM +0530, Sahitya Tummala wrote:
> list_lru_count_node() iterates over all memcgs to get
> the total number of entries on the node but it can race with
> memcg_drain_all_list_lrus(), which migrates the entries from
> a dead cgroup to another. This can return incorrect number of
> entries from list_lru_count_node().
> Fix this by keeping track of entries per node and simply return
> it in list_lru_count_node().
> Signed-off-by: Sahitya Tummala <stummala@xxxxxxxxxxxxxx>

Acked-by: Vladimir Davydov <>