Re: [PATCH v5 update 30/32] mm: memcontrol: convert objcg to be per-memcg per-node type
From: Qi Zheng
Date: Fri Feb 27 2026 - 01:36:19 EST
On 2/27/26 4:05 AM, Shakeel Butt wrote:
On Wed, Feb 25, 2026 at 05:44:56PM +0800, Qi Zheng wrote:
From: Qi Zheng <zhengqi.arch@xxxxxxxxxxxxx>
Convert objcg to be per-memcg per-node type, so that when reparent LRU
folios later, we can hold the lru lock at the node level, thus avoiding
holding too many lru locks at once.
Signed-off-by: Qi Zheng <zhengqi.arch@xxxxxxxxxxxxx>
---
changlog:
- fix a missing root_obj_cgroup conversion and completely delete
root_obj_cgroup.
After this patch, do we care that page/folio/slab points to the objcg of the
same node as them for a given memcg?
Maybe not. My only concern is whether the kernel has a way of
determining whether two folios belong to the same memcg by checking if
the objcg pointers are equal. If so, it needs to be changed to check if
objcg->memcg are equal.