lkml.org 
[lkml]   [2018]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1] ringbuffer: Don't choose the process with adj equal OOM_SCORE_ADJ_MIN
On Tue, 10 Apr 2018 10:32:36 +0800
Zhaoyang Huang <huangzhaoyang@gmail.com> wrote:

> For bellowing scenario, process A have no intension to exhaust the
> memory, but will be likely to be selected by OOM for we set
> OOM_CORE_ADJ_MIN for it.
> process A(-1000) process B
>
> i = si_mem_available();
> if (i < nr_pages)
> return -ENOMEM;
> schedule
> --------------->
> allocate huge memory
> <-------------
> if (user_thread)
> set_current_oom_origin();
>
> for (i = 0; i < nr_pages; i++) {
> bpage = kzalloc_node

Is this really an issue though?

Seriously, do you think you will ever hit this?

How often do you increase the size of the ftrace ring buffer? For this
to be an issue, the system has to trigger an OOM at the exact moment
you decide to increase the size of the ring buffer. That would be an
impressive attack, with little to gain.

Ask the memory management people. If they think this could be a
problem, then I'll be happy to take your patch.

-- Steve

\
 
 \ /
  Last update: 2018-04-10 05:13    [W:0.522 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site