summaryrefslogtreecommitdiffstats
path: root/include/linux/oom.h
diff options
context:
space:
mode:
authorDavid Rientjes <rientjes@google.com>2015-09-08 15:00:44 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2015-09-08 15:35:28 -0700
commit8989e4c7d4e3c30b55c998a1138cd06c92df7295 (patch)
tree6d3c8967401ff31e119573fb9cc32b3bece99354 /include/linux/oom.h
parent071a4befebb655d6b31bf5c6bacd5a6df035224d (diff)
downloadop-kernel-dev-8989e4c7d4e3c30b55c998a1138cd06c92df7295.zip
op-kernel-dev-8989e4c7d4e3c30b55c998a1138cd06c92df7295.tar.gz
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 <rientjes@google.com> Cc: Michal Hocko <mhocko@suse.cz> Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/oom.h')
-rw-r--r--include/linux/oom.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/include/linux/oom.h b/include/linux/oom.h
index 8fb67b9..03e6257 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;
};
/*
OpenPOWER on IntegriCloud