]> git.baikalelectronics.ru Git - kernel.git/commit
mm/memcg: move generation assignment and comparison together
authorWei Yang <richard.weiyang@gmail.com>
Fri, 29 Apr 2022 06:15:59 +0000 (23:15 -0700)
committerakpm <akpm@linux-foundation.org>
Fri, 29 Apr 2022 06:15:59 +0000 (23:15 -0700)
commit028696b90effc1ef22047c0b5552ed09a7e2584c
treeedde95609f76f436d12ab4e23b469789e83bb39f
parentdf03a7f3cae3a127f6d85c1febbf19f2ff40e08e
mm/memcg: move generation assignment and comparison together

For each round-trip, we assign generation on first invocation and compare
it on subsequent invocations.

Let's move them together to make it more self-explaining. Also this
reduce a check on prev.

[hannes@cmpxchg.org: better comment to explain reclaim model]
Link: https://lkml.kernel.org/r/20220330234719.18340-4-richard.weiyang@gmail.com
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Roman Gushchin <roman.gushchin@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memcontrol.c