public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Suren Baghdasaryan <surenb@google.com>
Cc: Michal Hocko <mhocko@suse.com>, Minchan Kim <minchan@kernel.org>,
	akpm@linux-foundation.org, brauner@kernel.org,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	timmurray@google.com, Johannes Weiner <hannes@cmpxchg.org>
Subject: Re: [RFC 0/3] mm: process_mrelease: expedited reclaim and auto-kill support
Date: Fri, 24 Apr 2026 09:41:01 +0200	[thread overview]
Message-ID: <dfb0e367-894e-4230-98f2-8e5bc554d293@kernel.org> (raw)
In-Reply-To: <CAJuCfpEGCvuaQ43W4_bPjpoiYgmEspxV78-U4dkA2bcjfxCyFA@mail.gmail.com>

On 4/24/26 00:36, Suren Baghdasaryan wrote:
> On Thu, Apr 23, 2026 at 2:50 AM David Hildenbrand (Arm)
> <david@kernel.org> wrote:
>>
>> On 4/23/26 09:50, Michal Hocko wrote:
>>> [...]
>>>
>>> This is a very creative/disruptive way to do a memory reclaim. From a
>>> user POV I would much rather see clean page cache reclaimed before my
>>> apps start to disappear. But this is obviously your call and your users
>>> that will care.
>>>
>>> Anyway, I still maintain my position. I do not think it is a good
>>> idea to drop clean page cache as you do not know whether there are other
>>> users.
> 
> I'm very much familiar with these issues in Android and really want to
> find a good solution for them. IIUC, this RFC tries to address 2
> things at once:
> 1. handling clean private page cache when reaping memory of a kill victim;
> 2. addressing a race between kill() and process_release() when
> process_release() can't happen before the kill() but if it happens too
> late after the victim passed its exit_mm() then process_release()
> fails to find the mm to reap. This defeats the purpose of
> process_release() call because the actual memory (released by
> exit_mmap()) might not yet be free and a successful process_release()
> would be very beneficial.
> 
> I see these two as separate issues and I'm not sure combining them
> into a single discussion is a good idea.
> 
>>
>> IIRC, Johannes raised in the past the we cannot predict the future.
>>
>> For example, if an app gets OOM-killed, wouldn't we usually try restarting it,
>> re-consuming the clean pagecache pages we would be evicting here?
> 
> Sure, we can't predict which app the user will use next, so when
> killing we usually kill the least recently used one. That's a
> reasonable strategy in most cases.

That makes sense. As long as other apps you open next won't need the same
libraries etc that you just evicted.

-- 
Cheers,

David

  parent reply	other threads:[~2026-04-24  7:41 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-13 22:39 [RFC 0/3] mm: process_mrelease: expedited reclaim and auto-kill support Minchan Kim
2026-04-13 22:39 ` [RFC 1/3] mm: process_mrelease: expedite clean file folio reclaim via mmu_gather Minchan Kim
2026-04-14  7:45   ` David Hildenbrand (Arm)
2026-04-14 20:21     ` Minchan Kim
2026-04-13 22:39 ` [RFC 2/3] mm: process_mrelease: skip LRU movement for exclusive file folios Minchan Kim
2026-04-14  7:20   ` David Hildenbrand (Arm)
2026-04-14 20:22     ` Minchan Kim
2026-04-13 22:39 ` [RFC 3/3] mm: process_mrelease: introduce PROCESS_MRELEASE_REAP_KILL flag Minchan Kim
2026-04-16  9:13   ` Christian Brauner
2026-04-17  6:30     ` Minchan Kim
2026-04-17  7:04       ` Michal Hocko
2026-04-20 21:47         ` Minchan Kim
2026-04-23  7:17           ` Michal Hocko
2026-04-23 23:43             ` Minchan Kim
2026-04-24  7:38               ` Michal Hocko
2026-04-14  6:57 ` [RFC 0/3] mm: process_mrelease: expedited reclaim and auto-kill support Michal Hocko
2026-04-14 20:00   ` Minchan Kim
2026-04-15  7:38     ` Michal Hocko
2026-04-15 23:26       ` Minchan Kim
2026-04-16  6:54         ` Michal Hocko
2026-04-17  6:20           ` Minchan Kim
2026-04-17  7:11             ` Michal Hocko
2026-04-20 21:53               ` Minchan Kim
2026-04-23  7:50                 ` Michal Hocko
2026-04-23  9:49                   ` David Hildenbrand (Arm)
2026-04-23 22:36                     ` Suren Baghdasaryan
2026-04-24  0:08                       ` Minchan Kim
2026-04-24  7:40                       ` Michal Hocko
2026-04-24  7:41                       ` David Hildenbrand (Arm) [this message]
2026-04-23 23:58                   ` Minchan Kim

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=dfb0e367-894e-4230-98f2-8e5bc554d293@kernel.org \
    --to=david@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=brauner@kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=minchan@kernel.org \
    --cc=surenb@google.com \
    --cc=timmurray@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