Re: [PATCH v9 3/6] mm: memcontrol: add interface for swap tier selection

From: Youngjun Park

Date: Mon Jun 22 2026 - 01:33:22 EST


https://sashiko.dev/#/patchset/20260620181635.299364-1-youngjun.park@xxxxxxx?part=3

Regarding the Sashiko review comment, I don't think this needs to be
fixed. It is acceptable for the effective_mask to be stale on a zombie
memcg.

The zombie memcg LRU is already reparented by the following patchset.
https://lore.kernel.org/all/cover.1772711148.git.zhengqi.arch@xxxxxxxxxxxxx/

the effective_mask is only needed on the swap path. Since
swap I/O rarely (if ever) happens on a zombie memcg, leaving the stale
mask should not cause issues.

(As I mentioned above, there is no need to fix as I think.
But somehow if we needed to fix this, there would be two alternatives.

1. Fix it at offline time by setting it to SWAP_TIER_ALL_MASK. However,
this approach would break the parent tier relationship.
2. Change the memcg iteration routine to use css_for_each_descendant_pre
to explicitly handle the zombie memcg case. This approach would
safely preserve the parent tier relationship.
)