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.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,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 3DE6DC5DF64 for ; Wed, 6 Nov 2019 20:34:53 +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 0F2B8217D7 for ; Wed, 6 Nov 2019 20:34:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="q90i5RhK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0F2B8217D7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org 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=wfmyO/RheXQF/oGEihxTZrvpkiR0olMNa9Kb4Puauz8=; b=q90i5RhKVO8kTA TmQZXw0mbqMbMMfDpOuUOVtXN7FzcNzVllWEiuHLcA0AOXatk+AxUtWR0TQf3mmADjljWxyF9oQ4P wqmijKlsEA07GOw9lQ4s+xgZ0oh6pU02BNwSnHKJTUFCgjWbHE389TnNiRh12IlFQy+ysLXoRC+x/ GtE8Z9rHMWbLOdGl0+a7geUdFZfoiRSyRsibmHKKO3ctG+AtXX1THZTNrSkWcdYz2+XuzRos/2A9x NVy+/LkScl3G8CP4Pq1q52iYJTv0yt+CGO33WyRxI8V/eA3wEWbrcL0oJsQns0jyRzCAzvzxdYRRC z+FMHYENrdaaSEw7PXKA==; 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 1iSS0y-0001ca-1a; Wed, 06 Nov 2019 20:34:52 +0000 Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1iSS0p-0001aI-GA; Wed, 06 Nov 2019 20:34:43 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id C2126980DF5; Wed, 6 Nov 2019 21:34:40 +0100 (CET) Date: Wed, 6 Nov 2019 21:34:40 +0100 From: Peter Zijlstra To: Dmitry Safonov Subject: Re: [PATCH 00/50] Add log level to show_stack() Message-ID: <20191106203440.GH3079@worktop.programming.kicks-ass.net> References: <20191106030542.868541-1-dima@arista.com> <20191106092039.GT4131@hirez.programming.kicks-ass.net> <10db6fa1-5b17-ebe6-09e0-6335e09e4db8@arista.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <10db6fa1-5b17-ebe6-09e0-6335e09e4db8@arista.com> User-Agent: Mutt/1.10.1 (2018-07-13) 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 , Petr Mladek , "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, Nov 06, 2019 at 04:27:33PM +0000, Dmitry Safonov wrote: > Hi Peter, > > On 11/6/19 9:20 AM, Peter Zijlstra wrote: > > On Wed, Nov 06, 2019 at 03:04:51AM +0000, 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] > >> 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. > > > > I really don't understand that word salad. Why are you doing this? > > > > Sorry, I should have tried to describe better. > > I'm trying to remove external users of console_loglevel by following > reasons: I suppose since all my machines have 'debug ignore_loglevel earlyprintk=serial,ttyS0,115200 console=ttyS0,115200' I don't have this experience. > - changing console_loglevel on SMP means that unwanted messages from > other CPUs will appear (that have lower log level) > - on UMP unwanted messages may appear if the code is preempted while it > hasn't set the console_loglevel back to old > - rising console_loglevel to print wanted message(s) may not work at all > if printk() has being delayed and the console_loglevel is already set > back to old value Sure, frobbing the global console_loglevel is bad. > I also have patches in wip those needs to print backtrace with specific > loglevel (higher when it's critical, lower when it's notice and > shouldn't go to serial console). (everything always should go to serial, serial is awesome :-) > Besides on local tests I see hits those have headers (messages like > "Backtrace: ") without an actual backtrace and the reverse - a backtrace > without a reason for it. It's quite annoying and worth addressing by > syncing headers log levels to backtraces. I suppose I'm surprised there are backtraces that are not important. Either badness happened and it needs printing, or the user asked for it and it needs printing. Perhaps we should be removing backtraces if they're not important instead of allowing to print them as lower loglevels? _______________________________________________ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc