From: Michal Hocko <mhocko@suse.com>
To: Yu Zhao <yuzhao@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Suren Baghdasaryan <surenb@google.com>,
David Rientjes <rientjes@google.com>,
Matthew Wilcox <willy@infradead.org>,
Johannes Weiner <hannes@cmpxchg.org>,
Roman Gushchin <guro@fb.com>, Minchan Kim <minchan@kernel.org>,
"Kirill A . Shutemov" <kirill@shutemov.name>,
Andrea Arcangeli <aarcange@redhat.com>,
brauner@kernel.org, Christoph Hellwig <hch@infradead.org>,
oleg@redhat.com, David Hildenbrand <david@redhat.com>,
Jann Horn <jannh@google.com>, Shakeel Butt <shakeelb@google.com>,
Peter Xu <peterx@redhat.com>, John Hubbard <jhubbard@nvidia.com>,
shuah@kernel.org, linux-kernel <linux-kernel@vger.kernel.org>,
Linux-MM <linux-mm@kvack.org>,
linux-kselftest@vger.kernel.org, kernel-team@android.com
Subject: Re: [PATCH RESEND v2 2/2] mm: delete unused MMF_OOM_VICTIM flag
Date: Mon, 29 Aug 2022 12:45:23 +0200 [thread overview]
Message-ID: <YwyYwxVOv0p736gf@dhcp22.suse.cz> (raw)
In-Reply-To: <YwyXhH6k1JVgKBVl@dhcp22.suse.cz>
On Mon 29-08-22 12:40:05, Michal Hocko wrote:
> On Sun 28-08-22 13:50:09, Yu Zhao wrote:
> > On Tue, Aug 23, 2022 at 2:36 AM Michal Hocko <mhocko@suse.com> wrote:
> [...]
> > > You cannot really make any
> > > assumptions about oom_reaper and how quickly it is going to free the
> > > memory.
> >
> > Agreed. But here we are talking about heuristics, not dependencies on
> > certain behaviors. Assume we are playing a guessing game: there are
> > multiple mm_structs available for reclaim, would the oom-killed ones
> > be more profitable on average? I'd say no, because I assume it's more
> > likely than unlikely that the oom reaper is doing/to do its work. Note
> > that the assumption is about likelihood, hence arguably valid.
>
> Well, my main counter argument would be that we do not really want to
> carve last resort mechanism (which the oom reaper is) into any heuristic
> because any future changes into that mechanism will be much harder to
> justify and change. There is a cost of the maintenance that should be
> considered. While you might be right that this change would be
> beneficial, there is no actual proof of that. Historically we've had
> several examples of such a behavior which was really hard to change
> later on because the effect would be really hard to evaluate.
Forgot to mention the recent change as a clear example of the change
which would be have a higher burden to evaluate. e4a38402c36e
("oom_kill.c: futex: delay the OOM reaper to allow time for proper futex
cleanup") has changed the wake up logic to be triggered after a timeout.
This means that the task will be sitting there on the queue without any
actual reclaim done on it. The timeout itself can be changed in the
future and I would really hate to argue that changeing it from $FOO to
$FOO + epsilon breaks a very subtle dependency somewhere deep in the
reclaim path. From the oom reaper POV any timeout is reasonable becaude
this is the _last_ resort to resolve OOM stall/deadlock when the victim
cannot exit on its own for whatever reason. This is a considerably
different objective from "we want to optimize which taks to scan to
reclaim efficiently".
See my point?
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2022-08-29 10:45 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-31 22:30 [PATCH RESEND v2 1/2] mm: drop oom code from exit_mmap Suren Baghdasaryan
2022-05-31 22:31 ` [PATCH RESEND v2 2/2] mm: delete unused MMF_OOM_VICTIM flag Suren Baghdasaryan
2022-08-22 22:21 ` Andrew Morton
2022-08-22 22:33 ` Yu Zhao
2022-08-22 22:48 ` Andrew Morton
2022-08-22 22:59 ` Yu Zhao
2022-08-22 23:16 ` Andrew Morton
2022-08-22 23:20 ` Yu Zhao
2022-08-23 8:36 ` Michal Hocko
2022-08-28 19:50 ` Yu Zhao
2022-08-29 10:40 ` Michal Hocko
2022-08-29 10:45 ` Michal Hocko [this message]
2022-06-01 21:36 ` [PATCH RESEND v2 1/2] mm: drop oom code from exit_mmap Andrew Morton
2022-06-01 21:47 ` Suren Baghdasaryan
2022-06-01 21:50 ` Suren Baghdasaryan
2022-06-02 6:53 ` Michal Hocko
2022-06-02 13:31 ` Liam Howlett
2022-06-02 14:08 ` Michal Hocko
2022-06-02 13:39 ` Matthew Wilcox
2022-06-02 15:02 ` Suren Baghdasaryan
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=YwyYwxVOv0p736gf@dhcp22.suse.cz \
--to=mhocko@suse.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=brauner@kernel.org \
--cc=david@redhat.com \
--cc=guro@fb.com \
--cc=hannes@cmpxchg.org \
--cc=hch@infradead.org \
--cc=jannh@google.com \
--cc=jhubbard@nvidia.com \
--cc=kernel-team@android.com \
--cc=kirill@shutemov.name \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.org \
--cc=oleg@redhat.com \
--cc=peterx@redhat.com \
--cc=rientjes@google.com \
--cc=shakeelb@google.com \
--cc=shuah@kernel.org \
--cc=surenb@google.com \
--cc=willy@infradead.org \
--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