From: "Michal Koutný" <mkoutny@suse.com>
To: Ruifeng Su <suruifeng1@huawei.com>
Cc: akpm@linux-foundation.org, linux-mm@kvack.org,
cgroups@vger.kernel.org, mhocko@kernel.org,
roman.gushchin@linux.dev, hannes@cmpxchg.org,
linmiaohe@huawei.com
Subject: Re: [PATCH] mm, memcg: avoid recycling when there is no more recyclable memory
Date: Wed, 1 Nov 2023 17:16:18 +0100 [thread overview]
Message-ID: <4ljrvuomfzrh3bypphkp5wbdzbkguts2icwoonykwttg2axwtv@oqnwohi52nmc> (raw)
In-Reply-To: <20231027093004.681270-1-suruifeng1@huawei.com>
[-- Attachment #1: Type: text/plain, Size: 939 bytes --]
Hello.
On Fri, Oct 27, 2023 at 05:30:04PM +0800, Ruifeng Su <suruifeng1@huawei.com> wrote:
> The test result shows that the program frequently sync iCache & dcache.
> As a result,
> the number of anon pages requested by the program cannot increase.
memory.high can be a tar-pit (instead of OOM).
> This patch changes the behavior of retry recycling.
What is behavior of your program after the change?
And what behavior do you expect?
> @@ -2616,7 +2615,7 @@ void mem_cgroup_handle_over_high(gfp_t gfp_mask)
> * memory.high, we want to encourage that rather than doing allocator
> * throttling.
> */
> - if (nr_reclaimed || nr_retries--) {
> + if (nr_reclaimed >= (in_retry ? SWAP_CLUSTER_MAX : nr_pages)) {
So this reads better as
if (nr_reclaimed >= to_reclaim)
> in_retry = true;
> goto retry_reclaim;
> }
So it would unnecessarily overreclaim in some cases.
Regards,
Michal
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2023-11-01 16:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-27 9:30 Ruifeng Su
2023-11-01 16:16 ` Michal Koutný [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-10-13 15:40 Ruifeng Su
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=4ljrvuomfzrh3bypphkp5wbdzbkguts2icwoonykwttg2axwtv@oqnwohi52nmc \
--to=mkoutny@suse.com \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=linmiaohe@huawei.com \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=roman.gushchin@linux.dev \
--cc=suruifeng1@huawei.com \
/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