From: Andrew Morton <akpm@linux-foundation.org>
To: Waiman Long <longman@redhat.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
Michal Hocko <mhocko@kernel.org>,
Roman Gushchin <roman.gushchin@linux.dev>,
Shakeel Butt <shakeel.butt@linux.dev>,
Muchun Song <muchun.song@linux.dev>,
linux-kernel@vger.kernel.org, cgroups@vger.kernel.org,
linux-mm@kvack.org
Subject: Re: [PATCH] memcg: Don't generate low/min events if either low/min or elow/emin is 0
Date: Wed, 2 Apr 2025 21:15:42 -0700 [thread overview]
Message-ID: <20250402211542.6bfb9ab3a6511ea26ce3cdf8@linux-foundation.org> (raw)
In-Reply-To: <20250403031212.317837-1-longman@redhat.com>
On Wed, 2 Apr 2025 23:12:12 -0400 Waiman Long <longman@redhat.com> wrote:
> The test_memcontrol selftest consistently fails its test_memcg_low
> sub-test because of the fact that two of its test child cgroups which
> have a memmory.low of 0 or an effective memory.low of 0 still have low
> events generated for them since mem_cgroup_below_low() use the ">="
> operator when comparing to elow.
>
> The simple fix of changing the operator to ">", however, changes the
> way memory reclaim works quite drastically leading to other failures.
> So we can't do that without some relatively riskier changes in memory
> reclaim.
>
> Another simpler alternative is to avoid reporting below_low failure
> if either memory.low or its effective equivalent is 0 which is done
> by this patch.
>
> With this patch applied, the test_memcg_low sub-test finishes
> successfully without failure in most cases. Though both test_memcg_low
> and test_memcg_min sub-tests may fail occasionally if the memory.current
> values fall outside of the expected ranges.
>
Well, maybe the selftest needs to be changed?
Please describe this patch in terms of "what is wrong with the code at
present" and "how that is fixed" and "what is the impact upon
userspace".
Is this change backwardly compatible with existing userspace?
> To be consistent, similar change is appled to mem_cgroup_below_min()
> as well.
Ditto.
next prev parent reply other threads:[~2025-04-03 4:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-03 3:12 Waiman Long
2025-04-03 4:15 ` Andrew Morton [this message]
2025-04-03 14:03 ` Waiman Long
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250402211542.6bfb9ab3a6511ea26ce3cdf8@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=longman@redhat.com \
--cc=mhocko@kernel.org \
--cc=muchun.song@linux.dev \
--cc=roman.gushchin@linux.dev \
--cc=shakeel.butt@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox