From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 12 Nov 2019 13:25:46 +0900 From: Sergey Senozhatsky Subject: Re: [PATCH 00/50] Add log level to show_stack() Message-ID: <20191112042546.GA119579@google.com> References: <20191106030542.868541-1-dima@arista.com> <20191106083538.z5nlpuf64cigxigh@pathway.suse.cz> <20191108103719.GB175344@google.com> <20191108130447.h3wfgo4efjkto56f@pathway.suse.cz> <20191111012336.GA85185@google.com> <13e72b62-c842-8ed5-5b41-bc1692b28f53@arista.com> <20191112021747.GA68506@google.com> <25cb9647-007a-9c18-4784-49c0aef4f54b@arista.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <25cb9647-007a-9c18-4784-49c0aef4f54b@arista.com> To: Dmitry Safonov Cc: Sergey Senozhatsky , Petr Mladek , linux-kernel@vger.kernel.org, Dmitry Safonov <0x7f454c46@gmail.com>, Andrew Morton , Greg Kroah-Hartman , Ingo Molnar , Jiri Slaby , Sergey Senozhatsky , Steven Rostedt , Tetsuo Handa , Albert Ou , Ben Segall , Dietmar Eggemann , Greentime Hu , Ingo Molnar , James Hogan , Juri Lelli , Mel Gorman , Michal Simek , Palmer Dabbelt , Paul Burton , Paul Walmsley , Peter Zijlstra , Ralf Baechle , Thomas Gleixner , Vincent Chen , Vincent Guittot , Will Deacon , linux-mips@vger.kernel.org, linux-riscv@lists.infradead.org, Ivan Kokshaysky , Matt Turner , Richard Henderson , linux-alpha@vger.kernel.org, Vineet Gupta , linux-snps-arc@lists.infradead.org, Russell King , linux-arm-kernel@lists.infradead.org, clang-built-linux@googlegroups.com, Catalin Marinas , Aurelien Jacquiot , Mark Salter , linux-c6x-dev@linux-c6x.org, Guo Ren , Yoshinori Sato , uclinux-h8-devel@lists.sourceforge.jp, Brian Cain , linux-hexagon@vger.kernel.org, Fenghua Yu , Tony Luck , linux-ia64@vger.kernel.org, Geert Uytterhoeven , linux-m68k@lists.linux-m68k.org, Ley Foon Tan , nios2-dev@lists.rocketboards.org, Jonas Bonn , Stafford Horne , Stefan Kristiansson , openrisc@lists.librecores.org, Helge Deller , "James E.J. Bottomley" , linux-parisc@vger.kernel.org, Benjamin Herrenschmidt , Michael Ellerman , Paul Mackerras , linuxppc-dev@lists.ozlabs.org, Christian Borntraeger , Heiko Carstens , Vasily Gorbik , linux-s390@vger.kernel.org, Rich Felker , linux-sh@vger.kernel.org, "David S. Miller" , sparclinux@vger.kernel.org, Anton Ivanov , Jeff Dike , Richard Weinberger , linux-um@lists.infradead.org, Guan Xuetao , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org, Chris Zankel , Max Filippov , linux-xtensa@linux-xtensa.org, Len Brown , Pavel Machek , "Rafael J. Wysocki" , linux-pm@vger.kernel.org, Daniel Thompson , Douglas Anderson , Jason Wessel , kgdb-bugreport@lists.sourceforge.net List-ID: On (19/11/12 02:40), Dmitry Safonov wrote: [..] > In my point of view the cost of one-time [mostly build] testing every > architecture is cheaper than introducing some new smart code that will > live forever. Well, there may be the need to pass loglevel deeper due to "hey __show_stack() on that arch invokes bar(), which invokes foo() and now foo() does printk(), but we don't see it". The context which decided to backtaraces decided to do so for a reason, probably, so I guess we can look at it as "a special error reporting code block". The proposed patch set passes loglevel via slightly unusual channel - via sprintf(). We probably can do it, but I would prefer to minimize the number of such printk-s in the kernel. The code snippet which I posted also does pretty unusual thing w.r.t loglevel. Both approaches are "non-standard" from that POV. > I'll reply to your suggestion tomorrow, it's a bit late in my tz. Sure. To anyone who will comment on that code snippet - this is not a "look, here is what you need to do" type of proposal. Just an alternative approach with its pros and cons. We had several requests over the years to have something like "forcibly allow all underlying printk-s from here to here" or "forcibly suppress or postpone underlying printk-s from here to here", etc. -ss