Skip to content

Commit

Permalink
mm, oom: add description of struct oom_control
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Sergey Senozhatsky <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
rientjes authored and torvalds committed Sep 8, 2015
1 parent 071a4be commit 8989e4c
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions include/linux/oom.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

/*
Expand Down

0 comments on commit 8989e4c

Please sign in to comment.