linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@suse.com>
To: "Liam R. Howlett" <Liam.Howlett@oracle.com>
Cc: Shakeel Butt <shakeel.butt@linux.dev>,
	Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
	zhongjinji <zhongjinji@honor.com>,
	rientjes@google.com, akpm@linux-foundation.org,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	tglx@linutronix.de, liulu.liu@honor.com, feng.han@honor.com
Subject: Re: [PATCH v5 2/2] mm/oom_kill: Have the OOM reaper and exit_mmap() traverse the maple tree in opposite order
Date: Fri, 29 Aug 2025 09:11:51 +0200	[thread overview]
Message-ID: <aLFSt1uId1B-AUk_@tiehlicka> (raw)
In-Reply-To: <6cqsibtttohay7ucs4ncmq6nf7xndtyvc4635i2e5ygjsppua6@7iwkgpp245jf>

On Wed 27-08-25 00:12:34, Liam R. Howlett wrote:
[...]
> > > I'd think using MMF_ to reduce the race
> > > would achieve the same goal with less risk - which is why I bring it up.
> > > 
> > 
> > With MMF_ flag, are you suggesting oom reaper to skip the unmapping of
> > the oom-killed process?
> 
> Yes, specifically move the MMF_OOM_SKIP flag to earlier in the exit
> path to reduce the possibility of the race/contention.

MMF_OOM_SKIP is a "hide from oom killer" flag and that means that as
soon as you set it up the next oom killer invocation would kill another
task while the current one hasn't freed up the memory yet and therefore
you have a potentially pointless kill.

-- 
Michal Hocko
SUSE Labs


  parent reply	other threads:[~2025-08-29  7:12 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-25 13:38 [PATCH v5 0/2] Do not delay oom reaper when the victim is frozen zhongjinji
2025-08-25 13:38 ` [PATCH v5 1/2] mm/oom_kill: " zhongjinji
2025-08-25 19:41   ` Shakeel Butt
2025-08-26 13:01     ` zhongjinji
2025-08-26 12:43   ` Lorenzo Stoakes
2025-08-27 12:08   ` Michal Hocko
2025-08-27 12:14     ` zhongjinji
2025-08-25 13:38 ` [PATCH v5 2/2] mm/oom_kill: Have the OOM reaper and exit_mmap() traverse the maple tree in opposite order zhongjinji
2025-08-26 12:53   ` Lorenzo Stoakes
2025-08-26 13:37     ` Liam R. Howlett
2025-08-26 13:50       ` Lorenzo Stoakes
2025-08-26 15:21         ` Liam R. Howlett
2025-08-26 22:26           ` Shakeel Butt
2025-08-27  4:12             ` Liam R. Howlett
2025-08-27  4:25               ` Liam R. Howlett
2025-08-27  9:55               ` zhongjinji
2025-08-27 15:57                 ` Suren Baghdasaryan
2025-08-28  0:38                   ` Liam R. Howlett
2025-08-29  7:11               ` Michal Hocko [this message]
2025-08-29  7:14     ` Michal Hocko

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=aLFSt1uId1B-AUk_@tiehlicka \
    --to=mhocko@suse.com \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=feng.han@honor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=liulu.liu@honor.com \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=rientjes@google.com \
    --cc=shakeel.butt@linux.dev \
    --cc=tglx@linutronix.de \
    --cc=zhongjinji@honor.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