As we've enhanced mem_cgroup_iter_invalidate() to NULL-ify 'last_visited' if it stored dying cgroups, we can be sure iter->last_visited always contain valid pointer to memcg (or NULL surely).
So just skip extra check iter->last_dead_count vs root->dead_count, it's not needed anymore. Note: the patch is prepared as small as possible - for review simplicity. Cleanup patch will follow. https://jira.sw.ru/browse/PSBM-123655 Signed-off-by: Konstantin Khorenko <[email protected]> --- mm/memcontrol.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index b6059f46049b..5fde291ecfee 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -1641,8 +1641,6 @@ mem_cgroup_iter_load(struct mem_cgroup_reclaim_iter *iter, * offlining. The RCU lock ensures the object won't be * released, tryget will fail if we lost the race. */ - *sequence = atomic_read(&root->dead_count); - if (iter->last_dead_count == *sequence) { position = rcu_dereference(iter->last_visited); /* @@ -1655,7 +1653,6 @@ mem_cgroup_iter_load(struct mem_cgroup_reclaim_iter *iter, !css_tryget(&position->css)) position = NULL; - } return position; } -- 2.24.3 _______________________________________________ Devel mailing list [email protected] https://lists.openvz.org/mailman/listinfo/devel
