lkml.org 
[lkml]   [2015]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch v3 1/3] mm, oom: organize oom context into struct
On Wed, 8 Jul 2015 16:42:42 -0700 (PDT) David Rientjes <rientjes@google.com> wrote:

> There are essential elements to an oom context that are passed around to
> multiple functions.
>
> Organize these elements into a new struct, struct oom_control, that
> specifies the context for an oom condition.
>
> This patch introduces no functional change.
>
> ...
>
> --- a/include/linux/oom.h
> +++ b/include/linux/oom.h
> @@ -12,6 +12,14 @@ struct notifier_block;
> struct mem_cgroup;
> struct task_struct;
>
> +struct oom_control {
> + struct zonelist *zonelist;
> + nodemask_t *nodemask;
> + gfp_t gfp_mask;
> + int order;
> + bool force_kill;
> +};

Some docs would be nice.

gfp_mask and order are what the page-allocating caller originally asked
for, I think? They haven't been mucked with?

It's somewhat obvious what force_kill does, but why is it provided, why
is it set? And what does it actually kill? A process which was
selected based on the other fields...

Also, it's a bit odd that zonelist and nodemask are here. They're
low-level implementation details whereas the other three fields are
high-level caller control stuff.

Anyway, please have a think about it. The definition site for a controlling
structure can be a great place to reveal the overall design and operation.


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