From: Muchun Song <muchun.song@linux.dev>
To: "Oscar Salvador (SUSE)" <osalvador@kernel.org>
Cc: Joshua Hahn <joshua.hahnjy@gmail.com>,
Hongfu Li <hongfu.li@linux.dev>,
Oscar Salvador <osalvador@suse.de>,
David Hildenbrand <david@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Shakeel Butt <shakeel.butt@linux.dev>,
Michal Hocko <mhocko@suse.com>,
Roman Gushchin <roman.gushchin@linux.dev>,
Nhat Pham <nphamcs@gmail.com>, Chris Down <chris@chrisdown.name>,
Johannes Weiner <hannes@cmpxchg.org>,
Michal Hocko <mhocko@kernel.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
cgroups@vger.kernel.org, Hongfu Li <lihongfu@kylinos.cn>,
stable@vger.kernel.org
Subject: Re: [PATCH 2/2] mm/memcg: migrate per-node hugetlb lruvec stat together with hugetlb folio
Date: Tue, 22 Sep 2026 14:31:14 +0800 [thread overview]
Message-ID: <D086B92E-13A8-48A7-97B6-CD671EE22033@linux.dev> (raw)
In-Reply-To: <arIEfJXYpspgX4-G@localhost.localdomain>
> On Sep 22, 2026, at 12:30, Oscar Salvador (SUSE) <osalvador@kernel.org> wrote:
>
> 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@kernel.org> 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.
The caller needs to make sure the liveness of lruvec, in which case,
lruvec is from memcg, so rcu lock is needed here.
Thanks,
Muchun
>
>
> --
> Oscar Salvador
> SUSE Labs
next prev parent reply other threads:[~2026-09-22 6:31 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-21 9:12 [PATCH 0/2] mm: fix hugetlb NR_HUGETLB accounting on folio migration Hongfu Li
2026-09-21 9:12 ` [PATCH 1/2] mm/hugetlb: account migration target folio in per-node NR_HUGETLB vmstat Hongfu Li
2026-09-21 22:35 ` Joshua Hahn
2026-09-22 3:34 ` Muchun Song
2026-09-22 3:33 ` Muchun Song
2026-09-22 4:04 ` Oscar Salvador (SUSE)
2026-09-21 9:12 ` [PATCH 2/2] mm/memcg: migrate per-node hugetlb lruvec stat together with hugetlb folio Hongfu Li
2026-09-21 23:03 ` Joshua Hahn
2026-09-22 4:15 ` Oscar Salvador (SUSE)
2026-09-22 4:20 ` Joshua Hahn
2026-09-22 4:30 ` Oscar Salvador (SUSE)
2026-09-22 6:31 ` Muchun Song [this message]
2026-09-22 6:18 ` Muchun Song
2026-09-22 9:38 ` Hongfu Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=D086B92E-13A8-48A7-97B6-CD671EE22033@linux.dev \
--to=muchun.song@linux.dev \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=chris@chrisdown.name \
--cc=david@kernel.org \
--cc=hannes@cmpxchg.org \
--cc=hongfu.li@linux.dev \
--cc=joshua.hahnjy@gmail.com \
--cc=lihongfu@kylinos.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=mhocko@suse.com \
--cc=nphamcs@gmail.com \
--cc=osalvador@kernel.org \
--cc=osalvador@suse.de \
--cc=roman.gushchin@linux.dev \
--cc=shakeel.butt@linux.dev \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®