Re: [PATCH 0/5] dump_stack: allow specifying printk log level

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu 05-11-15 17:30:14, aris@xxxxxxxxxx wrote:
> 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.

This looks good to me FWIW.
 
> 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@xxxxxxxxxxxxx>
> Cc: Ingo Molnar <mingo@xxxxxxxxxx>
> Cc: "H. Peter Anvin" <hpa@xxxxxxxxx>
> Cc: Michal Hocko <mhocko@xxxxxxxxxx>
> Cc: Greg Thelen <gthelen@xxxxxxxxxx>
> Cc: Johannes Weiner <hannes@xxxxxxxxxxx>
> Cc: David Rientjes <rientjes@xxxxxxxxxx>
> Signed-off-by: Aristeu Rozanski <aris@xxxxxxxxxx>
> 
> -- 
> Aristeu

-- 
Michal Hocko
SUSE Labs

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



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]