All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Weiner <hannes@cmpxchg.org>
To: David Rientjes <rientjes@google.com>
Cc: 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@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: Thu, 10 Mar 2022 11:58:09 -0500	[thread overview]
Message-ID: <YiouIRwnatra2g86@cmpxchg.org> (raw)
In-Reply-To: <63fcd044-7c87-63f3-391e-3b32f8feaae@google.com>

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.

> My first email in this thread proposes something that can still do memcg 
> based reclaim but is also possible even without CONFIG_MEMCG enabled.  
> That's particularly helpful for configs used by customers that don't use 
> memcg, namely Chrome OS.  I assume we're not losing any functionality that 
> your use case depends on if we are to introduce a per-node sysfs mechanism 
> for this as an alternative since you can still specify a memcg id?

We'd lose the delegation functionality with this proposal.

But per the other thread, I wouldn't be opposed to adding a global
per-node interface in addition to the cgroupfs one.


  reply	other threads:[~2022-03-10 16:58 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-06 23:11 [RFC] Mechanism to induce memory reclaim 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 [this message]
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=YiouIRwnatra2g86@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.