On Tue, Apr 15, 2025 at 05:04:14PM -0400, Waiman Long longman@redhat.com wrote:
- /*
* Child 2 has memory.low=0, but some low protection is still being
* distributed down from its parent with memory.low=50M if cgroup2
* memory_recursiveprot mount option is enabled. So the low event
* count will be non-zero in this case.
I say: Child 2 should have zero effective low value in this test case. Johannes says (IIUC): One cannot argue whether there is or isn't effective low for Child 2, it depends on siblings. (I also say that low events should only be counted for nominal low breaches but that's not so important here.)
But together this means no value of memory.events:low is valid or invalid in this testcase. Hence I suggested ignoring Child 2's value in checks.
for (i = 0; i < ARRAY_SIZE(children); i++) {*/
int no_low_events_index = 1;
long low, oom;int no_low_events_index = has_recursiveprot ? 2 : 1;
oom = cg_read_key_long(children[i], "memory.events", "oom ");
But this is not what I Suggested-by: [1]
Michal
[1] https://lore.kernel.org/r/awgbdn6gwnj4kfaezsorvopgsdyoty3yahdeanqvoxstz2w2ke...