]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - include/linux/oom.h
oom: do not take callback_mutex
[mirror_ubuntu-bionic-kernel.git] / include / linux / oom.h
CommitLineData
8ac773b4
AD
1#ifndef __INCLUDE_LINUX_OOM_H
2#define __INCLUDE_LINUX_OOM_H
3
5a3135c2
DR
4#include <linux/sched.h>
5
8ac773b4
AD
6/* /proc/<pid>/oom_adj set to -17 protects from the oom-killer */
7#define OOM_DISABLE (-17)
8/* inclusive */
9#define OOM_ADJUST_MIN (-16)
10#define OOM_ADJUST_MAX 15
11
5a3135c2
DR
12#ifdef __KERNEL__
13
70e24bdf
DR
14/*
15 * Types of limitations to the nodes from which allocations may occur
16 */
17enum oom_constraint {
18 CONSTRAINT_NONE,
19 CONSTRAINT_CPUSET,
20 CONSTRAINT_MEMORY_POLICY,
21};
22
098d7f12
DR
23extern int try_set_zone_oom(struct zonelist *zonelist);
24extern void clear_zonelist_oom(struct zonelist *zonelist);
25
5a3135c2
DR
26extern void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order);
27extern int register_oom_notifier(struct notifier_block *nb);
28extern int unregister_oom_notifier(struct notifier_block *nb);
29
30#endif /* __KERNEL__*/
31#endif /* _INCLUDE_LINUX_OOM_H */