Skip to content
This repository was archived by the owner on Dec 20, 2023. It is now read-only.

Commit 5a4a00b

Browse files
gthelengregkh
authored andcommitted
memcg: remove extra newlines from memcg oom kill log
commit 0346dad upstream. Commit e61734c ("cgroup: remove cgroup->name") added two extra newlines to memcg oom kill log messages. This makes dmesg hard to read and parse. The issue affects 3.15+. Example: Task in /t <<< extra #1 killed as a result of limit of /t <<< extra #2 memory: usage 102400kB, limit 102400kB, failcnt 274712 Remove the extra newlines from memcg oom kill messages, so the messages look like: Task in /t killed as a result of limit of /t memory: usage 102400kB, limit 102400kB, failcnt 240649 Fixes: e61734c ("cgroup: remove cgroup->name") Signed-off-by: Greg Thelen <gthelen@google.com> Acked-by: Michal Hocko <mhocko@suse.cz> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 8a71cc4 commit 5a4a00b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mm/memcontrol.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1638,9 +1638,9 @@ void mem_cgroup_print_oom_info(struct mem_cgroup *memcg, struct task_struct *p)
16381638

16391639
pr_info("Task in ");
16401640
pr_cont_cgroup_path(task_cgroup(p, memory_cgrp_id));
1641-
pr_info(" killed as a result of limit of ");
1641+
pr_cont(" killed as a result of limit of ");
16421642
pr_cont_cgroup_path(memcg->css.cgroup);
1643-
pr_info("\n");
1643+
pr_cont("\n");
16441644

16451645
rcu_read_unlock();
16461646

0 commit comments

Comments
 (0)