]> www.infradead.org Git - users/jedix/linux-maple.git/commit
memcg: workingset: remove folio_memcg_rcu usage
authorShakeel Butt <shakeel.butt@linux.dev>
Sat, 26 Oct 2024 16:37:07 +0000 (09:37 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 1 Nov 2024 04:29:27 +0000 (21:29 -0700)
commit5a35c7e47af2c29687800e5d7a8ce57781015e3f
treedcaca61f8db4f750455218e32e7b16f98c5392f5
parent4953bd4f9cae2c6544a27c21299f0f790a400c6c
memcg: workingset: remove folio_memcg_rcu usage

The function workingset_activation() is called from folio_mark_accessed()
with the guarantee that the given folio can not be freed under us in
workingset_activation().  In addition, the association of the folio and
its memcg can not be broken here because charge migration is no more.
There is no need to use folio_memcg_rcu.  Simply use folio_memcg_charged()
because that is what this function cares about.

Link: https://lkml.kernel.org/r/20241026163707.2479526-1-shakeel.butt@linux.dev
Signed-off-by: Shakeel Butt <shakeel.butt@linux.dev>
Suggested-by: Yu Zhao <yuzhao@google.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Muchun Song <songmuchun@bytedance.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Yosry Ahmed <yosryahmed@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/memcontrol.h
mm/workingset.c