memcg-v1: no need for memcg locking for dirty tracking
authorShakeel Butt <shakeel.butt@linux.dev>
Fri, 25 Oct 2024 01:23:00 +0000 (18:23 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 7 Nov 2024 04:11:19 +0000 (20:11 -0800)
commita8cd9d4ce35eaeb603c3ae7633bb120de5970b3c
treedaa7e7383cf7d4fbeb2876599eb38a5bff687294
parent6b611388b626eaa59d202bf8f64d095ff80bcde6
memcg-v1: no need for memcg locking for dirty tracking

During the era of memcg charge migration, the kernel has to be make
sure that the dirty stat updates do not race with the charge migration.
Otherwise it might update the dirty stats of the wrong memcg.  Now
with the memcg charge migration gone, there is no more race for dirty
stat updates and the previous locking can be removed.

Link: https://lkml.kernel.org/r/20241025012304.2473312-4-shakeel.butt@linux.dev
Signed-off-by: Shakeel Butt <shakeel.butt@linux.dev>
Acked-by: Michal Hocko <mhocko@suse.com>
Reviewed-by: Roman Gushchin <roman.gushchin@linux.dev>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Hugh Dickins <hughd@google.com>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Yosry Ahmed <yosryahmed@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/buffer.c
mm/page-writeback.c