oom: Be less verbose

Richard Weinberger
2014-06-05T14:00:40Z

Processes within Linux containers very often hit their memory limits.
This has the side effect that the kernel log gets spammed all day with
useless OOM messages.
If a userspace program listens to the memory cgroup event fd to
get notified upon OOM we can avoid this spamming and be less verbose.

With this patch applied the OOM killer will only print much details
if nobody listens to the affected memory cgroup event fd.
I can also think of a new sysctl like "vm.oom_verbose=1" to guarantee the old
behavior even if we have listeners.

What do you think?

Thanks,
//richard

[RFC][PATCH] oom: Be less verbose if the oom_control event fd has listeners
--
include/linux/memcontrol.h | 6 ++++++
mm/memcontrol.c | 20 ++++++++++++++++++++
mm/oom_kill.c | 2 +-
3 files changed, 27 insertions(+), 1 deletion(-)