On 3/13/26 15:16, Michal Koutný wrote:
Hi.
On Fri, Mar 13, 2026 at 12:40:05PM +0100, Natalie Vock <[email protected]>
wrote:
However, if we always calculate protection from the root cgroup, this
breaks prioritization of sibling cgroups: If one cgroup was explicitly
protected and its siblings were not, the protected cgroup should get
higher priority, i.e. the protected cgroup should be able to steal from
unprotected siblings. This only works if we restrict the protection
calculation to the subtree shared by evictor and evictee.
When there are thee siblings A, B, C where A has protection and C is
doing a new allocation (evictor) but hits a limit on L, what effective
values to A would be applied in the respective cases below?
Case 1)
L dmem.max
`- A dmem.low
`- B
`- C (alloc)
Case 2)
L dmem.max
`- M // dmem.low=0
`- A dmem.low
`- B
`- C (alloc)
I think it should be the configured A:dmem.low in the first case but
zero in the latter case because M has no protection configured. -- Is
that correct?
Yeah, I think so too. In the former case, A hits the shortcut for parent
== root in page_counter_calculate_protection(), so the effective
protection is set to the low setting directly. In case 2, they don't,
and since M:dmem.low is 0, M's effective low is also zero, and all its
children's protection is 0 as well.
Thanks,
Natalie
Thanks,
Michal