Re: [RFC PATCH 1/2] mm/swap, memcg: basic structure and logic for per cgroup swap priority control

From: Michal Koutný
Date: Wed Jun 18 2025 - 05:12:15 EST


On Wed, Jun 18, 2025 at 09:32:13AM +0900, YoungJun Park <youngjun.park@xxxxxxx> wrote:
> What issue is the question assuming the existence of competitors in two
> cgroups trying to address? Could you explain it a bit more specifically?

I'm after how this mechanism is supposed to honor hierarchical
structure. (I thought the numeric example was the most specific.)

>
> To answer your question for now,
> Each cgroup just prefers devices according to their priority values.
> until swap device is exhausted.
>
> cg1 prefer /dev/sda than /dev/sdb.
> cg2 prefer /dev/sdb than /dev/sda.
> cg3 prefer /dev/sdb than /dev/sda.
> cg4 prefer /dev/sda than /dev/sdb.

Hm, than means the settigs from cg1 (or cg2) don't apply to descendant
cg3 (or cg4) :-/

When referring to that document
(Documentation/admin-guide/cgroup-v2.rst) again, which of the "Resource
Distribution Models" do you find the most fitting for this scenario?

Thanks,
Michal

Attachment: signature.asc
Description: PGP signature