From: Shakeel Butt <shakeelb@google.com>
To: Michal Hocko <mhocko@suse.com>
Cc: David Rientjes <rientjes@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
Johannes Weiner <hannes@cmpxchg.org>,
Yu Zhao <yuzhao@google.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
linux-mm@kvack.org, Yosry Ahmed <yosryahmed@google.com>,
Wei Xu <weixugc@google.com>, Greg Thelen <gthelen@google.com>
Subject: Re: [RFC] Mechanism to induce memory reclaim
Date: Mon, 7 Mar 2022 18:31:41 +0000 [thread overview]
Message-ID: <20220307183141.npa4627fpbsbgwvv@google.com> (raw)
In-Reply-To: <YiYZqemRVlk2joYn@dhcp22.suse.cz>
On Mon, Mar 07, 2022 at 03:41:45PM +0100, Michal Hocko wrote:
> On Sun 06-03-22 15:11:23, David Rientjes wrote:
> [...]
> > Some questions to get discussion going:
> >
> > - Overall feedback or suggestions for the proposal in general?
> Do we really need this interface? What would be usecases which cannot
> use an existing interfaces we have for that? Most notably memcg and
> their high limit?
Let me take a stab at this. The specific reasons why high limit is not a
good interface to implement proactive reclaim:
1) It can cause allocations from the target application to get
throttled.
2) It leaves a state (high limit) in the kernel which needs to be reset
by the userspace part of proactive reclaimer.
If I remember correctly, Facebook actually tried to use high limit to
implement the proactive reclaim but due to exactly these limitations [1]
they went the route [2] aligned with this proposal.
To further explain why the above limitations are pretty bad: The
proactive reclaimers usually use feedback loop to decide how much to
squeeze from the target applications without impacting their performance
or impacting within a tolerable range. The metrics used for the feedback
loop are either refaults or PSI and these metrics becomes messy due to
application getting throttled due to high limit.
For (2), the high limit interface is a very awkward interface to use to
do proactive reclaim. If the userspace proactive reclaimer fails/crashed
due to whatever reason during triggering the reclaim in an application,
it can leave the application in a bad state (memory pressure state and
throttled) for a long time.
[1] https://lore.kernel.org/all/20200928210216.GA378894@cmpxchg.org/
[2] https://dl.acm.org/doi/10.1145/3503222.3507731 (Section 3.3)
next prev parent reply other threads:[~2022-03-07 18:31 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-06 23:11 David Rientjes
2022-03-07 0:49 ` Yu Zhao
2022-03-07 14:41 ` Michal Hocko
2022-03-07 18:31 ` Shakeel Butt [this message]
2022-03-07 20:26 ` Johannes Weiner
2022-03-08 12:53 ` Michal Hocko
2022-03-08 14:44 ` Dan Schatzberg
2022-03-08 16:05 ` Michal Hocko
2022-03-08 17:21 ` Wei Xu
2022-03-08 17:23 ` Johannes Weiner
2022-03-08 12:52 ` Michal Hocko
2022-03-09 22:03 ` David Rientjes
2022-03-10 16:58 ` Johannes Weiner
2022-03-10 17:25 ` Shakeel Butt
2022-03-10 17:33 ` Wei Xu
2022-03-10 17:42 ` Johannes Weiner
2022-03-07 20:50 ` Johannes Weiner
2022-03-07 22:53 ` Wei Xu
2022-03-08 12:53 ` Michal Hocko
2022-03-08 14:49 ` Dan Schatzberg
2022-03-08 19:27 ` Johannes Weiner
2022-03-08 22:37 ` Dan Schatzberg
2022-03-09 22:30 ` David Rientjes
2022-03-10 16:10 ` 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=20220307183141.npa4627fpbsbgwvv@google.com \
--to=shakeelb@google.com \
--cc=akpm@linux-foundation.org \
--cc=dave.hansen@linux.intel.com \
--cc=gthelen@google.com \
--cc=hannes@cmpxchg.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=rientjes@google.com \
--cc=weixugc@google.com \
--cc=yosryahmed@google.com \
--cc=yuzhao@google.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