All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: akpm@linux-foundation.org, mgorman@suse.de, rientjes@google.com,
	torvalds@linux-foundation.org, oleg@redhat.com, hughd@google.com,
	andrea@kernel.org, riel@redhat.com, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH] sysrq: ensure manual invocation of the OOM killer under OOM livelock
Date: Tue, 5 Jan 2016 19:05:09 +0100	[thread overview]
Message-ID: <20160105180507.GB23326@dhcp22.suse.cz> (raw)
In-Reply-To: <20160105162246.GH15324@dhcp22.suse.cz>

On Tue 05-01-16 17:22:46, Michal Hocko wrote:
> On Wed 30-12-15 15:33:47, Tetsuo Handa wrote:
[...]
> > I wish for a kernel thread that does OOM-kill operation.
> > Maybe we can change the OOM reaper kernel thread to do it.
> > What do you think?
> 
> I do no think a separate kernel thread would help much if the
> allocations have to keep looping in the allocator. oom_reaper is a
> separate kernel thread only due to locking required for the exit_mmap
> path.

Let me clarify what I've meant here. What you actually want is to do
select_bad_process and oom_kill_process (including oom_reap_vmas) in
the kernel thread context, right? That should be doable because we do
not depend on the allocation context there. That would certainly save
1 kernel thread for the sysrq+f part but it would make the regular
case more complicated AFAICS. We would have to handle queuing of the
oom requests because multiple oom killers might be active in different
allocation domains (cpusets, memcgs) so I am not so sure this would be a
great win in the end. But I haven't tried to do it so I might be wrong
and it will turn up being much more easier than I expect.

-- 
Michal Hocko
SUSE Labs

WARNING: multiple messages have this Message-ID (diff)
From: Michal Hocko <mhocko@kernel.org>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: akpm@linux-foundation.org, mgorman@suse.de, rientjes@google.com,
	torvalds@linux-foundation.org, oleg@redhat.com, hughd@google.com,
	andrea@kernel.org, riel@redhat.com, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH] sysrq: ensure manual invocation of the OOM killer under OOM livelock
Date: Tue, 5 Jan 2016 19:05:09 +0100	[thread overview]
Message-ID: <20160105180507.GB23326@dhcp22.suse.cz> (raw)
In-Reply-To: <20160105162246.GH15324@dhcp22.suse.cz>

On Tue 05-01-16 17:22:46, Michal Hocko wrote:
> On Wed 30-12-15 15:33:47, Tetsuo Handa wrote:
[...]
> > I wish for a kernel thread that does OOM-kill operation.
> > Maybe we can change the OOM reaper kernel thread to do it.
> > What do you think?
> 
> I do no think a separate kernel thread would help much if the
> allocations have to keep looping in the allocator. oom_reaper is a
> separate kernel thread only due to locking required for the exit_mmap
> path.

Let me clarify what I've meant here. What you actually want is to do
select_bad_process and oom_kill_process (including oom_reap_vmas) in
the kernel thread context, right? That should be doable because we do
not depend on the allocation context there. That would certainly save
1 kernel thread for the sysrq+f part but it would make the regular
case more complicated AFAICS. We would have to handle queuing of the
oom requests because multiple oom killers might be active in different
allocation domains (cpusets, memcgs) so I am not so sure this would be a
great win in the end. But I haven't tried to do it so I might be wrong
and it will turn up being much more easier than I expect.

-- 
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2016-01-05 18:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-30  6:33 [RFC][PATCH] sysrq: ensure manual invocation of the OOM killer under OOM livelock Tetsuo Handa
2015-12-30  6:33 ` Tetsuo Handa
2016-01-05 16:22 ` Michal Hocko
2016-01-05 16:22   ` Michal Hocko
2016-01-05 17:38   ` Michal Hocko
2016-01-05 17:38     ` Michal Hocko
2016-01-05 18:05   ` Michal Hocko [this message]
2016-01-05 18:05     ` Michal Hocko
2016-01-06 11:49     ` [RFC][PATCH] sysrq: ensure manual invocation of the OOM killerunder " Tetsuo Handa
2016-01-06 11:49       ` Tetsuo Handa
2016-01-06 13:17       ` Michal Hocko
2016-01-06 13:17         ` 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=20160105180507.GB23326@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=andrea@kernel.org \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=oleg@redhat.com \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    --cc=riel@redhat.com \
    --cc=rientjes@google.com \
    --cc=torvalds@linux-foundation.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.