dump_stack: allow specifying printk log level
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest5 patches 5 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | dump_stack: pass log level to dump_stack_print_info()lib/ | +11 | 0 replies | |
| 2/5 | dump_stack: introduce dump_stack_lvlinclude/ lib/ | +12 | 0 replies | |
| 3/5 | dump_stack: introduce generic show_stack_lvl()include/ lib/ | +9 | 0 replies | |
| 4/5 | x86: dumpstack - implement show_stack_lvl()arch/ | +7 | 1 reply | |
| 5/5 | mm: use KERN_DEBUG for dump_stack() during an OOMmm/ | +1 | 1 reply |
Reviews trailers per patch
2 of 5 patches have a Reviewed-by or Acked-by.
| Patch | Ingo Molnar | Michal Hocko |
|---|---|---|
| 1/5 | ||
| 2/5 | ||
| 3/5 | ||
| 4/5 | A-b | |
| 5/5 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/5] dump_stack: allow specifying printk log level
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).
Signature · 7 lines
Aristeu -- 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>