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

2017-06-28 Thread Vladimir Davydov
On Wed, Jun 28, 2017 at 11:37:23AM +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 incorrec

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

2017-06-27 Thread Sahitya Tummala
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 trac