]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/memcg: move generation assignment and comparison together
authorWei Yang <richard.weiyang@gmail.com>
Thu, 14 Apr 2022 06:07:05 +0000 (23:07 -0700)
committerakpm <akpm@linux-foundation.org>
Thu, 14 Apr 2022 06:07:05 +0000 (23:07 -0700)
commitd6b0cacb59e49ffe5e1e724a486272598522d3d4
tree682159a96536699424590524e1c0ec018253e297
parent248cb6c9e3f702a4bd138bcd910510d7c7129300
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