Re: [PATCH v6 3/4] mm: memcontrol: add interfaces for swap tier selection

From: YoungJun Park

Date: Thu Apr 23 2026 - 00:34:53 EST


On Tue, Apr 21, 2026 at 02:53:22PM +0900, Youngjun Park wrote:

There is one review from sashiko on this 3rd patch.
https://sashiko.dev/#/patchset/20260421055323.940344-1-youngjun.park@xxxxxxx?part=3

The concern about delegation and the global lock is valid in theory.
However, I do not think a change is necessary.

memory.swap.tiers is writable only in delegated subtrees, and delegation
itself is an administrative decision.

memory.swap.tiers is a configuration-time operation and not expected to
be updated frequently. Contention on swap_tier_lock would happen in a
configuration context (tier setup/update), not in a critical runtime
path. Therefore, it is unlikely to have a significant impact on normal
system operation.

Avoiding this would require computing the mask in the runtime path,
potentially on every I/O .Keeping the cost in the rare setup path seems preferable.

Best regards,
Youngjun Park