From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24DDFC5DF62 for ; Wed, 6 Nov 2019 08:36:36 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E733C2173B for ; Wed, 6 Nov 2019 08:36:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="IDXvMO3r" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E733C2173B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+infradead-linux-riscv=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZOUbIOndllY52PxyI7VeQqPjnhXSLOqlOyt0VDWf/Bs=; b=IDXvMO3rZIZ96V vEW765ZBN89Cfyp5ho7guY50vx73+sR9SiVctpT8XFOjyd7JNF9lZtAmXOEBrf3DsgJgt8SWpfgQF MqzbnVRgsKAUI6quRxHbUP3S5VG+1nqzfTZzZHQAOYmDvoD1PgFdj3oSTnkuOTYNBSATC8MkoC6SB 2jD4g/xU9TUBntT8T3Q0ZlR2/q4eiTN1YwQjzb2+HZlC781SpgqzZ+VA7MTm1n3Tb40BKmja5dxxN cEkjW2sa4zIq/avgP9AKYVIwqTmtrme49sx5wIf4eScse6kPrtf3OIZ0ykh6GuItL2A4nkj/Yu26t xpvownzCwiFismB3Tm3Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iSGnr-0000cn-2f; Wed, 06 Nov 2019 08:36:35 +0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iSGnn-0000a6-VT; Wed, 06 Nov 2019 08:36:33 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 19FADAE65; Wed, 6 Nov 2019 08:35:47 +0000 (UTC) Date: Wed, 6 Nov 2019 09:35:38 +0100 From: Petr Mladek To: Dmitry Safonov Subject: Re: [PATCH 00/50] Add log level to show_stack() Message-ID: <20191106083538.z5nlpuf64cigxigh@pathway.suse.cz> References: <20191106030542.868541-1-dima@arista.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20191106030542.868541-1-dima@arista.com> User-Agent: NeoMutt/20170912 (1.9.0) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191106_003632_305360_BE6D2475 X-CRM114-Status: GOOD ( 17.63 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Juri Lelli , linux-sh@vger.kernel.org, Catalin Marinas , Ben Segall , Guo Ren , Pavel Machek , Vincent Guittot , Paul Burton , Michael Ellerman , Geert Uytterhoeven , Mel Gorman , Jiri Slaby , Matt Turner , uclinux-h8-devel@lists.sourceforge.jp, Len Brown , linux-pm@vger.kernel.org, Heiko Carstens , linux-um@lists.infradead.org, Thomas Gleixner , Dietmar Eggemann , Richard Henderson , Greg Kroah-Hartman , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, Ralf Baechle , Paul Mackerras , Andrew Morton , linux-ia64@vger.kernel.org, Tetsuo Handa , James Hogan , "James E.J. Bottomley" , Max Filippov , Vincent Chen , Ingo Molnar , linux-s390@vger.kernel.org, linux-c6x-dev@linux-c6x.org, Yoshinori Sato , linux-hexagon@vger.kernel.org, Helge Deller , linux-xtensa@linux-xtensa.org, Vasily Gorbik , Aurelien Jacquiot , linux-m68k@lists.linux-m68k.org, Stafford Horne , linux-arm-kernel@lists.infradead.org, Chris Zankel , Tony Luck , Douglas Anderson , Benjamin Herrenschmidt , Dmitry Safonov <0x7f454c46@gmail.com>, Will Deacon , Daniel Thompson , Brian Cain , Christian Borntraeger , kgdb-bugreport@lists.sourceforge.net, linux-snps-arc@lists.infradead.org, Fenghua Yu , Borislav Petkov , Jeff Dike , Steven Rostedt , Ivan Kokshaysky , Greentime Hu , Guan Xuetao , linux-parisc@vger.kernel.org, linux-alpha@vger.kernel.org, Ley Foon Tan , "David S. Miller" , Rich Felker , Peter Zijlstra , "H. Peter Anvin" , sparclinux@vger.kernel.org, linux-riscv@lists.infradead.org, Anton Ivanov , Jonas Bonn , Richard Weinberger , x86@kernel.org, Russell King , clang-built-linux@googlegroups.com, Ingo Molnar , Mark Salter , Albert Ou , Stefan Kristiansson , openrisc@lists.librecores.org, Paul Walmsley , Michal Simek , Vineet Gupta , linux-mips@vger.kernel.org, Sergey Senozhatsky , Palmer Dabbelt , Jason Wessel , nios2-dev@lists.rocketboards.org, linuxppc-dev@lists.ozlabs.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+infradead-linux-riscv=archiver.kernel.org@lists.infradead.org On Wed 2019-11-06 03:04:51, Dmitry Safonov wrote: > Add log level argument to show_stack(). > Done in three stages: > 1. Introducing show_stack_loglvl() for every architecture > 2. Migrating old users with an explicit log level > 3. Renaming show_stack_loglvl() into show_stack() > > Justification: > o It's a design mistake to move a business-logic decision > into platform realization detail. > o I have currently two patches sets that would benefit from this work: > Removing console_loglevel jumps in sysrq driver [1] Just to clarify. The problem in sysrq driver is a bit different. It modifies console_loglevel to show even less important message on the console. IMHO, it should be solved by printing the header line with pr_error(). It is not ideal. A cleaner solution might be to introduce another loglevel that will always get pushed to the console. But I am not sure if it is worth this single line. > Hung task warning before panic [2] - suggested by Tetsuo (but he > probably didn't realise what it would involve). > o While doing (1), (2) the backtraces were adjusted to headers > and other messages for each situation - so there won't be a situation > when the backtrace is printed, but the headers are missing because > they have lesser log level (or the reverse). > o As the result in (2) plays with console_loglevel for kdb are removed. > The least important for upstream, but maybe still worth to note that > every company I've worked in so far had an off-list patch to print > backtrace with the needed log level (but only for the architecture they > cared about). > If you have other ideas how you will benefit from show_stack() with > a log level - please, reply to this cover letter. I agree with all the other justification. I would add. The backtrace is really useful for debugging. It should be possible to print it even in less critical situations. I am afraid that many people use WARN() for this purpose. But WARN() is not always appropriate. WARN() misuse huts when panic_on_warn option is used. Best Regards, Petr _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97C87C5DF62 for ; Wed, 6 Nov 2019 10:28:19 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 416DB217F4 for ; Wed, 6 Nov 2019 10:28:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 416DB217F4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 477N690wQyzDrfc for ; Wed, 6 Nov 2019 21:28:17 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=suse.com (client-ip=195.135.220.15; helo=mx1.suse.de; envelope-from=pmladek@suse.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.com Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 477KcS2cs3zF5Zh for ; Wed, 6 Nov 2019 19:35:50 +1100 (AEDT) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 19FADAE65; Wed, 6 Nov 2019 08:35:47 +0000 (UTC) Date: Wed, 6 Nov 2019 09:35:38 +0100 From: Petr Mladek To: Dmitry Safonov Subject: Re: [PATCH 00/50] Add log level to show_stack() Message-ID: <20191106083538.z5nlpuf64cigxigh@pathway.suse.cz> References: <20191106030542.868541-1-dima@arista.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191106030542.868541-1-dima@arista.com> User-Agent: NeoMutt/20170912 (1.9.0) X-Mailman-Approved-At: Wed, 06 Nov 2019 21:25:52 +1100 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Juri Lelli , linux-sh@vger.kernel.org, Catalin Marinas , Ben Segall , Guo Ren , Pavel Machek , Vincent Guittot , Paul Burton , Geert Uytterhoeven , Mel Gorman , Jiri Slaby , Matt Turner , uclinux-h8-devel@lists.sourceforge.jp, Len Brown , linux-pm@vger.kernel.org, Heiko Carstens , linux-um@lists.infradead.org, Thomas Gleixner , Dietmar Eggemann , Richard Henderson , Greg Kroah-Hartman , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, Ralf Baechle , Paul Mackerras , Andrew Morton , linux-ia64@vger.kernel.org, Tetsuo Handa , James Hogan , "James E.J. Bottomley" , Max Filippov , Vincent Chen , Ingo Molnar , linux-s390@vger.kernel.org, linux-c6x-dev@linux-c6x.org, Yoshinori Sato , linux-hexagon@vger.kernel.org, Helge Deller , linux-xtensa@linux-xtensa.org, Vasily Gorbik , Aurelien Jacquiot , linux-m68k@lists.linux-m68k.org, Stafford Horne , linux-arm-kernel@lists.infradead.org, Chris Zankel , Tony Luck , Douglas Anderson , Dmitry Safonov <0x7f454c46@gmail.com>, Will Deacon , Daniel Thompson , Brian Cain , Christian Borntraeger , kgdb-bugreport@lists.sourceforge.net, linux-snps-arc@lists.infradead.org, Fenghua Yu , Borislav Petkov , Jeff Dike , Steven Rostedt , Ivan Kokshaysky , Greentime Hu , Guan Xuetao , linux-parisc@vger.kernel.org, linux-alpha@vger.kernel.org, Ley Foon Tan , "David S. Miller" , Rich Felker , Peter Zijlstra , "H. Peter Anvin" , sparclinux@vger.kernel.org, linux-riscv@lists.infradead.org, Anton Ivanov , Jonas Bonn , Richard Weinberger , x86@kernel.org, Russell King , clang-built-linux@googlegroups.com, Ingo Molnar , Mark Salter , Albert Ou , Stefan Kristiansson , openrisc@lists.librecores.org, Paul Walmsley , Michal Simek , Vineet Gupta , linux-mips@vger.kernel.org, Sergey Senozhatsky , Palmer Dabbelt , Jason Wessel , nios2-dev@lists.rocketboards.org, linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Wed 2019-11-06 03:04:51, Dmitry Safonov wrote: > Add log level argument to show_stack(). > Done in three stages: > 1. Introducing show_stack_loglvl() for every architecture > 2. Migrating old users with an explicit log level > 3. Renaming show_stack_loglvl() into show_stack() > > Justification: > o It's a design mistake to move a business-logic decision > into platform realization detail. > o I have currently two patches sets that would benefit from this work: > Removing console_loglevel jumps in sysrq driver [1] Just to clarify. The problem in sysrq driver is a bit different. It modifies console_loglevel to show even less important message on the console. IMHO, it should be solved by printing the header line with pr_error(). It is not ideal. A cleaner solution might be to introduce another loglevel that will always get pushed to the console. But I am not sure if it is worth this single line. > Hung task warning before panic [2] - suggested by Tetsuo (but he > probably didn't realise what it would involve). > o While doing (1), (2) the backtraces were adjusted to headers > and other messages for each situation - so there won't be a situation > when the backtrace is printed, but the headers are missing because > they have lesser log level (or the reverse). > o As the result in (2) plays with console_loglevel for kdb are removed. > The least important for upstream, but maybe still worth to note that > every company I've worked in so far had an off-list patch to print > backtrace with the needed log level (but only for the architecture they > cared about). > If you have other ideas how you will benefit from show_stack() with > a log level - please, reply to this cover letter. I agree with all the other justification. I would add. The backtrace is really useful for debugging. It should be possible to print it even in less critical situations. I am afraid that many people use WARN() for this purpose. But WARN() is not always appropriate. WARN() misuse huts when panic_on_warn option is used. Best Regards, Petr From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48FE0C5DF63 for ; Wed, 6 Nov 2019 08:36:37 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 16004217F5 for ; Wed, 6 Nov 2019 08:36:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="pIzmyfS+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 16004217F5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-snps-arc-bounces+linux-snps-arc=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jf9WXyWvxqj2qv54pPFksLHjqy6lozSMTXM6ACVY6Bk=; b=pIzmyfS+fic0yi dam1Qz+4aPyo1u13U26o5zROnykDmprt7UtwVDyfEfR7IC9Aen4ma6He4sgCxJ2dJz6V6BrELmxhm KjzXeBcvnbTinXRBX2nLEzqbCcStfi8ObJO4lZrADGHzALjh5XA+/Asav7KE7dNsjC+6nI3kx1Hkr 9Qp5tUUXcGPIEC2Lfqf2o7ioU1KdNGUAGBBlU9k1VuIlpOUhsZI+NgksOyU0KgOfZvMj1JtFs1ICS Bqheac/g00CgwzhRLmt7408/sxOA7Er++o/BEer1jWwavXKaCPJRSGiTK4xEZ4Fnu+hfWfRMM3OI7 LdkDszgN/5gxARvQAAGg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iSGnr-0000eE-Vg; Wed, 06 Nov 2019 08:36:35 +0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iSGnn-0000a6-VT; Wed, 06 Nov 2019 08:36:33 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 19FADAE65; Wed, 6 Nov 2019 08:35:47 +0000 (UTC) Date: Wed, 6 Nov 2019 09:35:38 +0100 From: Petr Mladek To: Dmitry Safonov Subject: Re: [PATCH 00/50] Add log level to show_stack() Message-ID: <20191106083538.z5nlpuf64cigxigh@pathway.suse.cz> References: <20191106030542.868541-1-dima@arista.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20191106030542.868541-1-dima@arista.com> User-Agent: NeoMutt/20170912 (1.9.0) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191106_003632_305360_BE6D2475 X-CRM114-Status: GOOD ( 17.63 ) X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Juri Lelli , linux-sh@vger.kernel.org, Catalin Marinas , Ben Segall , Guo Ren , Pavel Machek , Vincent Guittot , Paul Burton , Michael Ellerman , Geert Uytterhoeven , Mel Gorman , Jiri Slaby , Matt Turner , uclinux-h8-devel@lists.sourceforge.jp, Len Brown , linux-pm@vger.kernel.org, Heiko Carstens , linux-um@lists.infradead.org, Thomas Gleixner , Dietmar Eggemann , Richard Henderson , Greg Kroah-Hartman , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, Ralf Baechle , Paul Mackerras , Andrew Morton , linux-ia64@vger.kernel.org, Tetsuo Handa , James Hogan , "James E.J. Bottomley" , Max Filippov , Vincent Chen , Ingo Molnar , linux-s390@vger.kernel.org, linux-c6x-dev@linux-c6x.org, Yoshinori Sato , linux-hexagon@vger.kernel.org, Helge Deller , linux-xtensa@linux-xtensa.org, Vasily Gorbik , Aurelien Jacquiot , linux-m68k@lists.linux-m68k.org, Stafford Horne , linux-arm-kernel@lists.infradead.org, Chris Zankel , Tony Luck , Douglas Anderson , Benjamin Herrenschmidt , Dmitry Safonov <0x7f454c46@gmail.com>, Will Deacon , Daniel Thompson , Brian Cain , Christian Borntraeger , kgdb-bugreport@lists.sourceforge.net, linux-snps-arc@lists.infradead.org, Fenghua Yu , Borislav Petkov , Jeff Dike , Steven Rostedt , Ivan Kokshaysky , Greentime Hu , Guan Xuetao , linux-parisc@vger.kernel.org, linux-alpha@vger.kernel.org, Ley Foon Tan , "David S. Miller" , Rich Felker , Peter Zijlstra , "H. Peter Anvin" , sparclinux@vger.kernel.org, linux-riscv@lists.infradead.org, Anton Ivanov , Jonas Bonn , Richard Weinberger , x86@kernel.org, Russell King , clang-built-linux@googlegroups.com, Ingo Molnar , Mark Salter , Albert Ou , Stefan Kristiansson , openrisc@lists.librecores.org, Paul Walmsley , Michal Simek , Vineet Gupta , linux-mips@vger.kernel.org, Sergey Senozhatsky , Palmer Dabbelt , Jason Wessel , nios2-dev@lists.rocketboards.org, linuxppc-dev@lists.ozlabs.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+linux-snps-arc=archiver.kernel.org@lists.infradead.org On Wed 2019-11-06 03:04:51, Dmitry Safonov wrote: > Add log level argument to show_stack(). > Done in three stages: > 1. Introducing show_stack_loglvl() for every architecture > 2. Migrating old users with an explicit log level > 3. Renaming show_stack_loglvl() into show_stack() > > Justification: > o It's a design mistake to move a business-logic decision > into platform realization detail. > o I have currently two patches sets that would benefit from this work: > Removing console_loglevel jumps in sysrq driver [1] Just to clarify. The problem in sysrq driver is a bit different. It modifies console_loglevel to show even less important message on the console. IMHO, it should be solved by printing the header line with pr_error(). It is not ideal. A cleaner solution might be to introduce another loglevel that will always get pushed to the console. But I am not sure if it is worth this single line. > Hung task warning before panic [2] - suggested by Tetsuo (but he > probably didn't realise what it would involve). > o While doing (1), (2) the backtraces were adjusted to headers > and other messages for each situation - so there won't be a situation > when the backtrace is printed, but the headers are missing because > they have lesser log level (or the reverse). > o As the result in (2) plays with console_loglevel for kdb are removed. > The least important for upstream, but maybe still worth to note that > every company I've worked in so far had an off-list patch to print > backtrace with the needed log level (but only for the architecture they > cared about). > If you have other ideas how you will benefit from show_stack() with > a log level - please, reply to this cover letter. I agree with all the other justification. I would add. The backtrace is really useful for debugging. It should be possible to print it even in less critical situations. I am afraid that many people use WARN() for this purpose. But WARN() is not always appropriate. WARN() misuse huts when panic_on_warn option is used. Best Regards, Petr _______________________________________________ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc From mboxrd@z Thu Jan 1 00:00:00 1970 From: Petr Mladek Date: Wed, 6 Nov 2019 09:35:38 +0100 Subject: [OpenRISC] [PATCH 00/50] Add log level to show_stack() In-Reply-To: <20191106030542.868541-1-dima@arista.com> References: <20191106030542.868541-1-dima@arista.com> Message-ID: <20191106083538.z5nlpuf64cigxigh@pathway.suse.cz> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: openrisc@lists.librecores.org On Wed 2019-11-06 03:04:51, Dmitry Safonov wrote: > Add log level argument to show_stack(). > Done in three stages: > 1. Introducing show_stack_loglvl() for every architecture > 2. Migrating old users with an explicit log level > 3. Renaming show_stack_loglvl() into show_stack() > > Justification: > o It's a design mistake to move a business-logic decision > into platform realization detail. > o I have currently two patches sets that would benefit from this work: > Removing console_loglevel jumps in sysrq driver [1] Just to clarify. The problem in sysrq driver is a bit different. It modifies console_loglevel to show even less important message on the console. IMHO, it should be solved by printing the header line with pr_error(). It is not ideal. A cleaner solution might be to introduce another loglevel that will always get pushed to the console. But I am not sure if it is worth this single line. > Hung task warning before panic [2] - suggested by Tetsuo (but he > probably didn't realise what it would involve). > o While doing (1), (2) the backtraces were adjusted to headers > and other messages for each situation - so there won't be a situation > when the backtrace is printed, but the headers are missing because > they have lesser log level (or the reverse). > o As the result in (2) plays with console_loglevel for kdb are removed. > The least important for upstream, but maybe still worth to note that > every company I've worked in so far had an off-list patch to print > backtrace with the needed log level (but only for the architecture they > cared about). > If you have other ideas how you will benefit from show_stack() with > a log level - please, reply to this cover letter. I agree with all the other justification. I would add. The backtrace is really useful for debugging. It should be possible to print it even in less critical situations. I am afraid that many people use WARN() for this purpose. But WARN() is not always appropriate. WARN() misuse huts when panic_on_warn option is used. Best Regards, Petr From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 6 Nov 2019 09:35:38 +0100 From: Petr Mladek Subject: Re: [PATCH 00/50] Add log level to show_stack() Message-ID: <20191106083538.z5nlpuf64cigxigh@pathway.suse.cz> References: <20191106030542.868541-1-dima@arista.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191106030542.868541-1-dima@arista.com> To: Dmitry Safonov Cc: 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 Wed 2019-11-06 03:04:51, Dmitry Safonov wrote: > Add log level argument to show_stack(). > Done in three stages: > 1. Introducing show_stack_loglvl() for every architecture > 2. Migrating old users with an explicit log level > 3. Renaming show_stack_loglvl() into show_stack() > > Justification: > o It's a design mistake to move a business-logic decision > into platform realization detail. > o I have currently two patches sets that would benefit from this work: > Removing console_loglevel jumps in sysrq driver [1] Just to clarify. The problem in sysrq driver is a bit different. It modifies console_loglevel to show even less important message on the console. IMHO, it should be solved by printing the header line with pr_error(). It is not ideal. A cleaner solution might be to introduce another loglevel that will always get pushed to the console. But I am not sure if it is worth this single line. > Hung task warning before panic [2] - suggested by Tetsuo (but he > probably didn't realise what it would involve). > o While doing (1), (2) the backtraces were adjusted to headers > and other messages for each situation - so there won't be a situation > when the backtrace is printed, but the headers are missing because > they have lesser log level (or the reverse). > o As the result in (2) plays with console_loglevel for kdb are removed. > The least important for upstream, but maybe still worth to note that > every company I've worked in so far had an off-list patch to print > backtrace with the needed log level (but only for the architecture they > cared about). > If you have other ideas how you will benefit from show_stack() with > a log level - please, reply to this cover letter. I agree with all the other justification. I would add. The backtrace is really useful for debugging. It should be possible to print it even in less critical situations. I am afraid that many people use WARN() for this purpose. But WARN() is not always appropriate. WARN() misuse huts when panic_on_warn option is used. Best Regards, Petr From mboxrd@z Thu Jan 1 00:00:00 1970 From: Petr Mladek Subject: Re: [PATCH 00/50] Add log level to show_stack() Date: Wed, 6 Nov 2019 09:35:38 +0100 Message-ID: <20191106083538.z5nlpuf64cigxigh@pathway.suse.cz> References: <20191106030542.868541-1-dima@arista.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZOUbIOndllY52PxyI7VeQqPjnhXSLOqlOyt0VDWf/Bs=; b=IDXvMO3rZIZ96V vEW765ZBN89Cfyp5ho7guY50vx73+sR9SiVctpT8XFOjyd7JNF9lZtAmXOEBrf3DsgJgt8SWpfgQF MqzbnVRgsKAUI6quRxHbUP3S5VG+1nqzfTZzZHQAOYmDvoD1PgFdj3oSTnkuOTYNBSATC8MkoC6SB 2jD4g/xU9TUBntT8T3Q0ZlR2/q4eiTN1YwQjzb2+HZlC781SpgqzZ+VA7MTm1n3Tb40BKmja5dxxN cEkjW2sa4zIq/avgP9AKYVIwqTmtrme49sx5wIf4eScse6kPrtf3OIZ0ykh6GuItL2A4nkj/Yu26t xpvownzCwiFismB3Tm3Q==; Content-Disposition: inline In-Reply-To: <20191106030542.868541-1-dima@arista.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+glpr-linux-riscv=m.gmane.org@lists.infradead.org To: Dmitry Safonov Cc: Juri Lelli , linux-sh@vger.kernel.org, Catalin Marinas , Ben Segall , Guo Ren , Pavel Machek , Vincent Guittot , Paul Burton , Michael Ellerman , Geert Uytterhoeven , Mel Gorman , Jiri Slaby , Matt Turner , uclinux-h8-devel@lists.sourceforge.jp, Len Brown , linux-pm@vger.kernel.org, Heiko Carstens , linux-um@lists.infradead.org, Thomas Gleixner , Dietmar Eggemann , Richard Henderson , Greg Kroah-Hartman , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, Ralf Baechle On Wed 2019-11-06 03:04:51, Dmitry Safonov wrote: > Add log level argument to show_stack(). > Done in three stages: > 1. Introducing show_stack_loglvl() for every architecture > 2. Migrating old users with an explicit log level > 3. Renaming show_stack_loglvl() into show_stack() > > Justification: > o It's a design mistake to move a business-logic decision > into platform realization detail. > o I have currently two patches sets that would benefit from this work: > Removing console_loglevel jumps in sysrq driver [1] Just to clarify. The problem in sysrq driver is a bit different. It modifies console_loglevel to show even less important message on the console. IMHO, it should be solved by printing the header line with pr_error(). It is not ideal. A cleaner solution might be to introduce another loglevel that will always get pushed to the console. But I am not sure if it is worth this single line. > Hung task warning before panic [2] - suggested by Tetsuo (but he > probably didn't realise what it would involve). > o While doing (1), (2) the backtraces were adjusted to headers > and other messages for each situation - so there won't be a situation > when the backtrace is printed, but the headers are missing because > they have lesser log level (or the reverse). > o As the result in (2) plays with console_loglevel for kdb are removed. > The least important for upstream, but maybe still worth to note that > every company I've worked in so far had an off-list patch to print > backtrace with the needed log level (but only for the architecture they > cared about). > If you have other ideas how you will benefit from show_stack() with > a log level - please, reply to this cover letter. I agree with all the other justification. I would add. The backtrace is really useful for debugging. It should be possible to print it even in less critical situations. I am afraid that many people use WARN() for this purpose. But WARN() is not always appropriate. WARN() misuse huts when panic_on_warn option is used. Best Regards, Petr