Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1495843

Re: [PATCH 0/4] mm, oom: get rid of TIF_MEMDIE

From Michal Hocko <mhocko@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 0/4] mm, oom: get rid of TIF_MEMDIE
Date 2016-10-05 14:10 +0200
Message-ID <soTbk-MS-35@gated-at.bofh.it> (permalink)
References <sotTz-Ep-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue 04-10-16 11:00:05, Michal Hocko wrote:
[...]
> Recent changes in the oom proper allows for that finally, I believe. Now
> that all the oom victims are reapable we are no longer depending on
> ALLOC_NO_WATERMARKS because the memory held by the victim is reclaimed
> asynchronously. A partial access to memory reserves should be sufficient
> just to guarantee that the oom victim is not starved due to other
> memory consumers. This also means that we do not have to pretend to be
> conservative and give access to memory reserves only to one thread from
> the process at the time. This is patch 1.
> 
> Patch 2 is a simple cleanup which turns TIF_MEMDIE users to tsk_is_oom_victim
> which is process rather than thread centric. None of those callers really
> requires to be thread aware AFAICS.
> 
> The tricky part then is exit_oom_victim vs. oom_killer_disable because
> TIF_MEMDIE acted as a token there so we had a way to count threads from
> the process. It didn't work 100% reliably and had its own issues but we
> have to replace it with something which doesn't rely on counting threads
> but rather find a moment when all threads have reached steady state in
> do_exit. This is what patch 3 does and I would really appreciate if Oleg
> could double check my thinking there. I am also CCing Al on that one
> because I am moving exit_io_context up in do_exit right before exit_notify.

It became apparent that the last part was wrong after Oleg's review. I
definitely want to come up with something that works eventually. I am
just wondering whether patches 1-2 are worth accepting without the rest.
I fully realize those patches are less attractive when TIF_MEMDIE stays
but I would argue that reducing the TIF_MEMDIE users will make the code
slightly better and easier to understand.

What do you think?
-- 
Michal Hocko
SUSE Labs

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 0/4] mm, oom: get rid of TIF_MEMDIE Michal Hocko <mhocko@kernel.org> - 2016-10-04 11:10 +0200
  [PATCH 1/4] mm, oom: do not rely on TIF_MEMDIE for memory reserves access Michal Hocko <mhocko@kernel.org> - 2016-10-04 11:10 +0200
  [PATCH 2/4] mm: replace TIF_MEMDIE checks by tsk_is_oom_victim Michal Hocko <mhocko@kernel.org> - 2016-10-04 11:10 +0200
  Re: [PATCH 0/4] mm, oom: get rid of TIF_MEMDIE Michal Hocko <mhocko@kernel.org> - 2016-10-05 14:10 +0200

csiph-web