[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0033f39f-ff47-4645-9b1e-f19ff39233e7@redhat.com>
Date: Sun, 20 Apr 2025 17:48:15 -0400
From: Waiman Long <llong@...hat.com>
To: Michal Koutný <mkoutny@...e.com>
Cc: Johannes Weiner <hannes@...xchg.org>, Michal Hocko <mhocko@...nel.org>,
Roman Gushchin <roman.gushchin@...ux.dev>,
Shakeel Butt <shakeel.butt@...ux.dev>, Muchun Song <muchun.song@...ux.dev>,
Andrew Morton <akpm@...ux-foundation.org>, Tejun Heo <tj@...nel.org>,
Shuah Khan <shuah@...nel.org>, linux-kernel@...r.kernel.org,
cgroups@...r.kernel.org, linux-mm@...ck.org, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH v7 1/2] selftests: memcg: Allow low event with no
memory.low and memory_recursiveprot on
On 4/16/25 5:25 AM, Michal Koutný wrote:
> On Tue, Apr 15, 2025 at 05:04:14PM -0400, Waiman Long <longman@...hat.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.
I understand your point of view. What I want to do is to document the
expected behavior and I don't see any example of ignoring a metric for a
particular child in the test. In this particular test, I did see an elow
of 17 for child 2.
>
>> + */
>> for (i = 0; i < ARRAY_SIZE(children); i++) {
>> - int no_low_events_index = 1;
>> + int no_low_events_index = has_recursiveprot ? 2 : 1;
>> long low, oom;
>>
>> oom = cg_read_key_long(children[i], "memory.events", "oom ");
> But this is not what I Suggested-by: [1]
I was referring to the suggestion that the setting of
memory_recursiveprot mount option has a material impact of the child 2
test result. Roman probably didn't have memory_recursiveprot set when
developing this selftest.
I can take out the Suggested-by tag.
Cheers,
Longman
>
> Michal
>
> [1] https://lore.kernel.org/r/awgbdn6gwnj4kfaezsorvopgsdyoty3yahdeanqvoxstz2w2ke@xc3sv43elkz5
Powered by blists - more mailing lists