Despite mm.h is not being exported header, it does contain one thing
which is part of userspace ABI -- value disabling OOM killer. So,
a) export mm.h to userspace
b) got OOM_DISABLE disable define out of __KERNEL__ prison.
c) turn bound values suitable for /proc/$PID/oom_adj into defines and export
them too.
d) put some headers into __KERNEL__ prison. It'd bizarre to include mm.h and
get capability stuff.
Signed-off-by: Alexey Dobriyan <adobriyan@xxxxxxxxx>
---
+/* /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