.. | .. |
---|
15 | 15 | struct mem_cgroup; |
---|
16 | 16 | struct task_struct; |
---|
17 | 17 | |
---|
| 18 | +enum oom_constraint { |
---|
| 19 | + CONSTRAINT_NONE, |
---|
| 20 | + CONSTRAINT_CPUSET, |
---|
| 21 | + CONSTRAINT_MEMORY_POLICY, |
---|
| 22 | + CONSTRAINT_MEMCG, |
---|
| 23 | +}; |
---|
| 24 | + |
---|
18 | 25 | /* |
---|
19 | 26 | * Details of the page allocation that triggered the oom killer that are used to |
---|
20 | 27 | * determine what should be killed. |
---|
.. | .. |
---|
41 | 48 | /* Used by oom implementation, do not set */ |
---|
42 | 49 | unsigned long totalpages; |
---|
43 | 50 | struct task_struct *chosen; |
---|
44 | | - unsigned long chosen_points; |
---|
| 51 | + long chosen_points; |
---|
| 52 | + struct task_struct *chosen_non_negative_adj; |
---|
| 53 | + long chosen_non_negative_adj_points; |
---|
| 54 | + |
---|
| 55 | + /* Used to print the constraint info. */ |
---|
| 56 | + enum oom_constraint constraint; |
---|
45 | 57 | }; |
---|
46 | 58 | |
---|
47 | 59 | extern struct mutex oom_lock; |
---|
.. | .. |
---|
98 | 110 | |
---|
99 | 111 | bool __oom_reap_task_mm(struct mm_struct *mm); |
---|
100 | 112 | |
---|
101 | | -extern unsigned long oom_badness(struct task_struct *p, |
---|
102 | | - struct mem_cgroup *memcg, const nodemask_t *nodemask, |
---|
| 113 | +long oom_badness(struct task_struct *p, |
---|
103 | 114 | unsigned long totalpages); |
---|
104 | 115 | |
---|
105 | 116 | extern bool out_of_memory(struct oom_control *oc); |
---|
.. | .. |
---|
118 | 129 | extern int sysctl_oom_dump_tasks; |
---|
119 | 130 | extern int sysctl_oom_kill_allocating_task; |
---|
120 | 131 | extern int sysctl_panic_on_oom; |
---|
| 132 | + |
---|
| 133 | +/* call for adding killed process to reaper. */ |
---|
| 134 | +extern void add_to_oom_reaper(struct task_struct *p); |
---|
121 | 135 | #endif /* _INCLUDE_LINUX_OOM_H */ |
---|