From: 杨逸飞 <yangyifei03@kuaishou.com>
To: "akpm@linux-foundation.org" <akpm@linux-foundation.org>
Cc: "hannes@cmpxchg.org" <hannes@cmpxchg.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
杨逸飞 <yangyifei03@kuaishou.com>
Subject: Re: [PATCH] mm:vmscan: fix inaccurate reclaim during proactive reclaim
Date: Tue, 11 Jul 2023 09:43:02 +0000 [thread overview]
Message-ID: <7A6BB714-4DDB-492C-9CEE-1C52DBB3F0CF@kuaishou.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 608 bytes --]
Thank you for your reply. shrink_lruvec() is nested in deep loop. Reclaimer may have already reclaimed part of requested memory in one loop, but before adjust sc->nr_to_reclaim in outer loop, call shrink_lruvec() again will still follow the current sc->nr_to_reclaim to work. It will eventually lead to overreclaim.
Problematic case is easy to be constructed. Allocate lots of anonymous memory(e.g. 20G) in a memcg, then swapping by writing memory.reclaim and there is a certain probability of overreclaim.
(Sorry to find out that there was a problem with the format of the previous reply. Thanks again.)
[-- Attachment #2: Type: text/html, Size: 2864 bytes --]
next reply other threads:[~2023-07-11 9:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-11 9:43 杨逸飞 [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-07-21 1:41 Efly Young
2023-07-20 7:27 Efly Young
2023-07-20 16:24 ` Johannes Weiner
2023-07-07 10:32 Efly Young
2023-07-07 19:09 ` Andrew Morton
2023-07-11 15:28 ` Johannes Weiner
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=7A6BB714-4DDB-492C-9CEE-1C52DBB3F0CF@kuaishou.com \
--to=yangyifei03@kuaishou.com \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/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