linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] dump_stack: allow specifying printk log level
@ 2015-11-05 22:30 aris
  2015-11-05 22:30 ` [PATCH 1/5] dump_stack: pass log level to dump_stack_print_info() aris
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: aris @ 2015-11-05 22:30 UTC (permalink / raw)
  To: linux-kerne
  Cc: linux-mm, x86, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Michal Hocko, Greg Thelen, Johannes Weiner, David Rientjes

This patchset lays the foundation work to allow using dump_stack() with a
specified printk log level. Currently each architecture uses a different
log level in show_stack() and it's not possible to control it without
calling directly architecture specific functions.

The motivation behind this work is to limit the amount of kernel messages
printed in the console when a process is killed by the OOM killer. In some
scenarios (lots of containers running different customers' workloads) OOMs
are way more common and don't require the console to be flooded by stack
traces when the OOM killer probably did the right choice. During a recent
discussion it was determined that a knob to control when dump_stack() is
called is a bad idea and instead we should tune the log level in dump_stack()
which prompted this work.

This patchset introduces two new functions:
	dump_stack_lvl(char *log_lvl)
	show_stack_lvl(struct task_struct *task, unsigned long *sp, char *log_lvl)

and both can be reimplemented by each architecture but only the second is
expected. The idea is to initially implement show_stack_lvl() in all
architectures then simply have show_stack() to require log_lvl as parameter.
While that happens, dump_stack() uses can be changed to dump_stack_lvl() and
once everything is in place, dump_stack() will require the log_level as well.

I have a draft patch for every architecture but for this patchset I'm only
including x86 to get some feedback while I try to get a cross compiler working
for each one of them (which is being harder than I thought).

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Greg Thelen <gthelen@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Aristeu Rozanski <aris@redhat.com>

-- 
Aristeu

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-12-02 13:53 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-05 22:30 [PATCH 0/5] dump_stack: allow specifying printk log level aris
2015-11-05 22:30 ` [PATCH 1/5] dump_stack: pass log level to dump_stack_print_info() aris
2015-11-05 22:30 ` [PATCH 2/5] dump_stack: introduce dump_stack_lvl aris
2015-11-05 22:30 ` [PATCH 3/5] dump_stack: introduce generic show_stack_lvl() aris
2015-11-05 22:30 ` [PATCH 4/5] x86: dumpstack - implement show_stack_lvl() aris
2015-11-12  8:06   ` Ingo Molnar
2015-11-05 22:30 ` [PATCH 5/5] mm: use KERN_DEBUG for dump_stack() during an OOM aris
2015-11-12 10:26   ` Michal Hocko
2015-11-09 16:21 ` [PATCH 0/5] dump_stack: allow specifying printk log level Michal Hocko
2015-12-01 23:48   ` Andrew Morton
2015-12-02 13:53     ` Aristeu Rozanski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).