Skip to contentSkip to conversation

memcg: remove extra newlines from memcg oom kill log

PATCH In review Greg Thelen 3 participants 3 messages Jan 13, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 memcg: remove extra newlines from memcg oom kill log

Commit e61734c55c24 ("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 e61734c55c24 ("cgroup: remove cgroup->name")
---
 mm/memcontrol.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
mm/memcontrol.c +2 -2
index 851924fa5170..683b4782019b 100644
@@ -1477,9 +1477,9 @@ void mem_cgroup_print_oom_info(struct mem_cgroup *memcg, struct task_struct *p)
 
 	pr_info("Task in ");
 	pr_cont_cgroup_path(task_cgroup(p, memory_cgrp_id));
-	pr_info(" killed as a result of limit of ");
+	pr_cont(" killed as a result of limit of ");
 	pr_cont_cgroup_path(memcg->css.cgroup);
-	pr_info("\n");
+	pr_cont("\n");
 
 	rcu_read_unlock();
 
Signature · 1 line
2.2.0.rc0.207.ga3a616c
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Greg Thelen

Commit e61734c55c24 ("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

Quoted 7 lines

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 e61734c55c24 ("cgroup: remove cgroup->name")
Quoted 23 lines
---
 mm/memcontrol.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
mm/memcontrol.c +2 -2
index 851924fa5170..683b4782019b 100644
@@ -1477,9 +1477,9 @@ void mem_cgroup_print_oom_info(struct mem_cgroup *memcg, struct task_struct *p)
 
 	pr_info("Task in ");
 	pr_cont_cgroup_path(task_cgroup(p, memory_cgrp_id));
-	pr_info(" killed as a result of limit of ");
+	pr_cont(" killed as a result of limit of ");
 	pr_cont_cgroup_path(memcg->css.cgroup);
-	pr_info("\n");
+	pr_cont("\n");
 
 	rcu_read_unlock();
 
Signature · 1 line
2.2.0.rc0.207.ga3a616c
Signature · 8 lines
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
maintainer Acked-by on v1 1/1
#2 lore raw
In reply to Greg Thelen
Quoted 9 lines · Greg Thelen

Commit e61734c55c24 ("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

Quoted 7 lines

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 e61734c55c24 ("cgroup: remove cgroup->name")