From: David Rientjes Date: Tue, 8 Sep 2015 22:00:44 +0000 (-0700) Subject: mm, oom: add description of struct oom_control X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8989e4c7d4e3c30b55c998a1138cd06c92df7295;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git mm, oom: add description of struct oom_control Describe the purpose of struct oom_control and what each member does. Also make gfp_mask and order const since they are never manipulated or passed to functions that discard the qualifier. Signed-off-by: David Rientjes Cc: Michal Hocko Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/oom.h b/include/linux/oom.h index 8fb67b9e6110..03e6257321f0 100644 --- a/include/linux/oom.h +++ b/include/linux/oom.h @@ -12,11 +12,25 @@ struct notifier_block; struct mem_cgroup; struct task_struct; +/* + * Details of the page allocation that triggered the oom killer that are used to + * determine what should be killed. + */ struct oom_control { + /* Used to determine cpuset */ struct zonelist *zonelist; - nodemask_t *nodemask; - gfp_t gfp_mask; - int order; + + /* Used to determine mempolicy */ + nodemask_t *nodemask; + + /* Used to determine cpuset and node locality requirement */ + const gfp_t gfp_mask; + + /* + * order == -1 means the oom kill is required by sysrq, otherwise only + * for display purposes. + */ + const int order; }; /*