lkml.org 
[lkml]   [2015]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch v2 2/3] mm, oom: organize oom context into struct
On Thu, 2 Jul 2015, Michal Hocko wrote:

> On Wed 01-07-15 14:37:14, David Rientjes wrote:
> > The force_kill member of struct oom_control isn't needed if an order of
> > -1 is used instead. This is the same as order == -1 in
> > struct compact_control which requires full memory compaction.
> >
> > This patch introduces no functional change.
>
> But it obscures the code and I really dislike this change as pointed out
> previously.
>

The oom killer is often called at the end of a very lengthy stack since
memory allocation itself can be called deep in the stack. Thus, reducing
the amount of memory, even for a small lil bool, is helpful. This is
especially true when other such structs, struct compact_control, does the
exact same thing by using order == -1 to mean explicit compaction.

I'm personally tired of fixing stack overflows and you're arguing against
"obscurity" that even occurs in other parts of the mm code.
oc->force_kill has no reason to exist, and thus it's removed in this patch
and for good reason.


\
 
 \ /
  Last update: 2015-07-09 01:41    [W:0.045 / U:1.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site