Re: [PATCH 2/2] mm/memcg: migrate per-node hugetlb lruvec stat together with hugetlb folio
From: Oscar Salvador (SUSE)
Date: Tue Sep 22 2026 - 00:34:58 EST
On Mon, Sep 21, 2026 at 09:20:53PM -0700, Joshua Hahn wrote:
> On Tue, 22 Sep 2026 06:15:07 +0200 "Oscar Salvador (SUSE)" <osalvador@xxxxxxxxxx> wrote:
> > Why do we need the whole thing to be embraced by rcu?
>
> Hi Oscar,
Hi Joshua,
>
> I believe it's because now getting the memcg from the objcg requires
> an RCU lock to make sure it doesn't get removed while we work on the
> memcg. I think this is since Qi Zheng's "Eliminate Dying Memory
> Cgroup" series.
Yes, I understood that obj_cgroup_memcg might need the rcu-dance, but I was
unsure about the mod_memcg_lruvec_state() calls.
--
Oscar Salvador
SUSE Labs