Re: [PATCH] OOM killer meets userspace headers

From: Nick Piggin
Date: Wed Oct 18 2006 - 11:06:25 EST


Alexey Dobriyan wrote:
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>
---

Seems fine. Silly question:

+/* /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

Why do you need the () for the -ves?

--
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com -
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/