diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2006-10-19 23:28:32 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-20 10:26:38 -0700 |
commit | 8ac773b4f73afa6fd66695131103944b975d5d5c (patch) | |
tree | 7a3ea0d703cde009c5f2e1196d80f06cf5d00d54 /include/linux/oom.h | |
parent | 887b95931b4072e60e3bf4253ff7bffe372bca46 (diff) | |
download | op-kernel-dev-8ac773b4f73afa6fd66695131103944b975d5d5c.zip op-kernel-dev-8ac773b4f73afa6fd66695131103944b975d5d5c.tar.gz |
[PATCH] OOM killer meets userspace headers
Despite mm.h is not being exported header, it does contain one thing
which is part of userspace ABI -- value disabling OOM killer for given
process. So,
a) create and export include/linux/oom.h
b) move OOM_DISABLE define there.
c) turn bounding values of /proc/$PID/oom_adj into defines and export
them too.
Note: mass __KERNEL__ removal will be done later.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/oom.h')
-rw-r--r-- | include/linux/oom.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/oom.h b/include/linux/oom.h new file mode 100644 index 0000000..ad76463 --- /dev/null +++ b/include/linux/oom.h @@ -0,0 +1,10 @@ +#ifndef __INCLUDE_LINUX_OOM_H +#define __INCLUDE_LINUX_OOM_H + +/* /proc/<pid>/oom_adj set to -17 protects from the oom-killer */ +#define OOM_DISABLE (-17) +/* inclusive */ +#define OOM_ADJUST_MIN (-16) +#define OOM_ADJUST_MAX 15 + +#endif |