Re: [patch 1/3] mm, oom: organize oom context into struct
From: Sergey Senozhatsky
Date: Thu Jun 18 2015 - 20:14:15 EST
Hello,
On (06/18/15 16:00), David Rientjes 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_context, that
> specifies the context for an oom condition.
>
s/oom_context/oom_control/ ?
[..]
>
> +struct oom_control {
> + struct zonelist *zonelist;
> + nodemask_t *nodemask;
> + gfp_t gfp_mask;
> + int order;
> + bool force_kill;
> +};
> +
> -extern void check_panic_on_oom(enum oom_constraint constraint, gfp_t gfp_mask,
> - int order, const nodemask_t *nodemask,
> +extern void check_panic_on_oom(struct oom_control *oc,
> + enum oom_constraint constraint,
> struct mem_cgroup *memcg);
>
> -extern enum oom_scan_t oom_scan_process_thread(struct task_struct *task,
> - unsigned long totalpages, const nodemask_t *nodemask,
> - bool force_kill);
> +extern enum oom_scan_t oom_scan_process_thread(struct oom_control *oc,
> + struct task_struct *task, unsigned long totalpages);
>
> -extern bool out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask,
> - int order, nodemask_t *mask, bool force_kill);
> +extern bool out_of_memory(struct oom_control *oc);
>
> extern void exit_oom_victim(void);
>
[..]
-ss
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/