linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Weiner <hannes@cmpxchg.org>
To: Wei Xu <weixugc@google.com>
Cc: David Rientjes <rientjes@google.com>,
	Michal Hocko <mhocko@suse.com>,
	Shakeel Butt <shakeelb@google.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Yu Zhao <yuzhao@google.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Linux MM <linux-mm@kvack.org>,
	Yosry Ahmed <yosryahmed@google.com>,
	Greg Thelen <gthelen@google.com>
Subject: Re: [RFC] Mechanism to induce memory reclaim
Date: Thu, 10 Mar 2022 12:42:42 -0500	[thread overview]
Message-ID: <Yio4krXBOIWsr5Fs@cmpxchg.org> (raw)
In-Reply-To: <CAAPL-u8KYPibcuD972+=9F29onfO_xswngW+=axtcuZqUf7qxw@mail.gmail.com>

On Thu, Mar 10, 2022 at 09:33:48AM -0800, Wei Xu wrote:
> On Thu, Mar 10, 2022 at 8:58 AM Johannes Weiner <hannes@cmpxchg.org> wrote:
> >
> > On Wed, Mar 09, 2022 at 02:03:21PM -0800, David Rientjes wrote:
> > > On Tue, 8 Mar 2022, Michal Hocko wrote:
> > >
> > > > > 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.
> > > >
> > > > I do remember we have discussed this in the past. There were proposals
> > > > for an additional limit to trigger a background reclaim [3] or to add a
> > > > pressure based memcg knob [4]. For the nr_to_reclaim based interface
> > > > there were some challenges outlined in that email thread. I do
> > > > understand that practical experience could have confirmed or diminished
> > > > those concerns.
> > > >
> > > > I am definitely happy to restart those discussion but it would be really
> > > > great to summarize existing options and why they do not work in
> > > > practice. It would be also great to mention why concerns about nr_to_reclaim
> > > > based interface expressed in the past are not standing out anymore wrt.
> > > > other proposals.
> > > >
> > >
> > > Johannes, since you had pointed out that the current approach used at Meta
> > > and described in the TMO paper works well in practice and is based on
> > > prior discussions of memory.reclaim[1], do you have any lingering concerns
> > > from that 2020 thread?
> >
> > I'd be okay with merging the interface proposed in that thread as-is.
> 
> We will need a nodemask argument for the memory tiering use case. We
> can add it as an optional argument to memory.reclaim later.  Or do you
> think we should add a different interface (e.g. memory.demote) for
> memory tiering instead?

Yes, good point. We can add an optional parameter later on, methinks,
as the behavior for when it's omitted shouldn't change.


  reply	other threads:[~2022-03-10 17:42 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
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 [this message]
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=Yio4krXBOIWsr5Fs@cmpxchg.org \
    --to=hannes@cmpxchg.org \
    --cc=akpm@linux-foundation.org \
    --cc=dave.hansen@linux.intel.com \
    --cc=gthelen@google.com \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=rientjes@google.com \
    --cc=shakeelb@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