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


Groups > linux.kernel > #1277768

Re: [RFC PATCH] mm, oom: introduce oom reaper

From Johannes Weiner <hannes@cmpxchg.org>
Newsgroups linux.kernel
Subject Re: [RFC PATCH] mm, oom: introduce oom reaper
Date 2015-11-25 21:10 +0100
Message-ID <qyOy7-2xe-27@gated-at.bofh.it> (permalink)
References <qyKEb-8h2-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Michal,

I think whatever we end up doing to smoothen things for the "common
case" (as much as OOM kills can be considered common), we need a plan
to resolve the memory deadlock situations in a finite amount of time.

Eventually we have to attempt killing another task. Or kill all of
them to save the kernel.

It just strikes me as odd to start with smoothening the common case,
rather than making it functionally correct first.

On Wed, Nov 25, 2015 at 04:56:58PM +0100, Michal Hocko wrote:
> A kernel thread has been chosen because we need a reliable way of
> invocation so workqueue context is not appropriate because all the
> workers might be busy (e.g. allocating memory). Kswapd which sounds
> like another good fit is not appropriate as well because it might get
> blocked on locks during reclaim as well.

Why not do it directly from the allocating context? I.e. when entering
the OOM killer and finding a lingering TIF_MEMDIE from a previous kill
just reap its memory directly then and there. It's not like the
allocating task has anything else to do in the meantime...

> @@ -1123,7 +1126,7 @@ static unsigned long zap_pte_range(struct mmu_gather *tlb,
>  			continue;
>  		}
>  		/* If details->check_mapping, we leave swap entries. */
> -		if (unlikely(details))
> +		if (unlikely(details || !details->check_swap_entries))
>  			continue;

&&
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


Thread

[RFC PATCH] mm, oom: introduce oom reaper Michal Hocko <mhocko@kernel.org> - 2015-11-25 17:00 +0100
  Re: [RFC PATCH] mm, oom: introduce oom reaper Johannes Weiner <hannes@cmpxchg.org> - 2015-11-25 21:10 +0100
    Re: [RFC PATCH] mm, oom: introduce oom reaper Michal Hocko <mhocko@kernel.org> - 2015-11-26 12:10 +0100
      Re: [RFC PATCH] mm, oom: introduce oom reaper Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2015-11-26 16:30 +0100
        Re: [RFC PATCH] mm, oom: introduce oom reaper Michal Hocko <mhocko@kernel.org> - 2015-11-26 17:40 +0100
          Re: [RFC PATCH] mm, oom: introduce oom reaper Michal Hocko <mhocko@kernel.org> - 2015-11-26 18:40 +0100
          Re: [RFC PATCH] mm, oom: introduce oom reaper Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2015-11-27 12:30 +0100
            Re: [RFC PATCH] mm, oom: introduce oom reaper Michal Hocko <mhocko@kernel.org> - 2015-11-27 13:40 +0100
  [RFC PATCH -v2] mm, oom: introduce oom reaper Michal Hocko <mhocko@kernel.org> - 2015-11-27 17:20 +0100
    Re: [RFC PATCH -v2] mm, oom: introduce oom reaper Mel Gorman <mgorman@suse.de> - 2015-11-27 17:40 +0100
    Re: [RFC PATCH -v2] mm, oom: introduce oom reaper Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2015-11-28 05:50 +0100
      Re: [RFC PATCH -v2] mm, oom: introduce oom reaper Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2015-11-28 17:20 +0100

csiph-web