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 74880C43331 for ; Wed, 13 Nov 2019 02:42:23 +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 2BB4A2196E for ; Wed, 13 Nov 2019 02:42:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="RAeQL7WJ"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=arista.com header.i=@arista.com header.b="httZFalB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2BB4A2196E Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=arista.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:Date: Message-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rLh7Q3GdiOOnXztTmb+NTAb+Wh+Y3hEa8ZnAFymAzVc=; b=RAeQL7WJnGNv4+ GVRE3f6r+ph8NVKKzr7TopfFmQ+hGX116RGQTwPjZx/hgpiFoDX6ur/kYP41Ae4ncHawPS8+qVUq5 RFjHfwVt4jkjzp0VG0Pa8dOmbBVwEQtD/H5S4nlWz/07fyYhL92tMprdPt6KOKsb0bpidNGts1Pdm S/6OixtTCSoaUDNZKXSLRW8xvNXNTSRvcwSNeaFqD8Jwfrrhj7FL+2mfnRw6M18HDrjt1PYp3HY1s hAouTcL7YlssVNeciEZlYhpzk8Af0BFgXUUXxbbq8xEgEyp3X1LkzIR4c56LQjmkGwpmDfIseVFLH v2syWlxIQYsk6R0NkP6A==; 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 1iUibu-0006Cr-9d; Wed, 13 Nov 2019 02:42:22 +0000 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iUibr-0006Bc-B9 for linux-riscv@lists.infradead.org; Wed, 13 Nov 2019 02:42:20 +0000 Received: by mail-pg1-x543.google.com with SMTP id l24so345577pgh.10 for ; Tue, 12 Nov 2019 18:42:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arista.com; s=googlenew; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=9ewNkq+k7WzF7N7FeKsJZWJsQUcIf4AaWPjf05A0Fco=; b=httZFalB2VvN+DAYr6xQfb8CS2lpW4CgtAeEsAWgjkvbyyGvCmjTLAPAEMfF/JCr7/ c8P9raTPSqNexy65EPzsFOdG6kVk1K592cMDIy0cHhBebJPWF8fQ9egPpzwWXfBWSrCz Jk1zAXvG+gTTHY9iuktiuKZH9vWWl//5vaZrlx7ppzhO4sTAZlX2C/T/kVZYDrElUqcN VIOq5oDXrk5HHYGKLT0+ff2WZ+LnUZTUWEqoGOOJeX0XdIUXtb1PCt6iQWGnVWpEOeHv 9p5PFEhwRvitpIH0ba4n5ClWOCwYigDV+TgMORDfM82fnMfxgxqmD7OSd4a8lnQJEp7K YgYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=9ewNkq+k7WzF7N7FeKsJZWJsQUcIf4AaWPjf05A0Fco=; b=pK7qaM47TwbxJS84iqud3LKc6GwYfvtrQUb1Aat4uhlRweUoBraduk5bOUottAWXv6 HC9LxNATyMdKL2N6aSYdklZlullfp+5PU4c94tmfdB51ix4CipcAaTNexWq2iEaJ19UK NkTlgtkuRdG9q5TAUu4RkNNk9JU6EtZ47KlHndaQjSjYyuEuEEMcjIVyELk8XwHI6BUU LOz80/ArUDyKPi1CFLfCZJB78yF9BR1XsYcXZ5teyR5L8YLN47cdIg2ilqmN98kl2a22 mYtvqOyqS+i7k403Pgx4FTg5V+vO7TGgonIP7/sZj41fesA0wkWEr7aCBp2+5U/wAUOZ HlSw== X-Gm-Message-State: APjAAAUL3ACBWj2Wqsb3iGJ2pMNxfKIpMljIRnFr8g/hgb1R2kgA4aea luBdPsRNzH8V4ee24NvK9u1LGg== X-Google-Smtp-Source: APXvYqyg0YKjFTNIvTLCv1J1tDb1jq98QSviRK57/SbcLNfCJ0c+TDqSL8X9WHbEQTrvYD3q+/dxRw== X-Received: by 2002:a63:cb0f:: with SMTP id p15mr887811pgg.81.1573612938430; Tue, 12 Nov 2019 18:42:18 -0800 (PST) Received: from [10.83.36.153] ([217.173.96.166]) by smtp.gmail.com with ESMTPSA id r22sm395559pfg.54.2019.11.12.18.41.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 12 Nov 2019 18:42:17 -0800 (PST) Subject: Re: [PATCH 00/50] Add log level to show_stack() To: Sergey Senozhatsky 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> <20191112042546.GA119579@google.com> From: Dmitry Safonov Message-ID: Date: Wed, 13 Nov 2019 02:41:50 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <20191112042546.GA119579@google.com> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191112_184219_383422_D4E4B0AA X-CRM114-Status: GOOD ( 15.22 ) 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 , Petr Mladek , 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 11/12/19 4:25 AM, Sergey Senozhatsky wrote: > 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 don't strongly disagree, but if you look at those results: git grep 'printk("%s.*", \(lvl\|level\)' it seems to be used in quite a few places. Thanks, Dmitry _______________________________________________ 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.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 B8E5AC43331 for ; Wed, 13 Nov 2019 04:19:03 +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 67A60222D0 for ; Wed, 13 Nov 2019 04:19:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=arista.com header.i=@arista.com header.b="httZFalB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 67A60222D0 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=arista.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 47CWZs1hljzF482 for ; Wed, 13 Nov 2019 15:19:01 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=arista.com (client-ip=2607:f8b0:4864:20::442; helo=mail-pf1-x442.google.com; envelope-from=dima@arista.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=arista.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=arista.com header.i=@arista.com header.b="httZFalB"; dkim-atps=neutral Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 47CTRK643QzF6H6 for ; Wed, 13 Nov 2019 13:42:21 +1100 (AEDT) Received: by mail-pf1-x442.google.com with SMTP id 3so537983pfb.10 for ; Tue, 12 Nov 2019 18:42:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arista.com; s=googlenew; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=9ewNkq+k7WzF7N7FeKsJZWJsQUcIf4AaWPjf05A0Fco=; b=httZFalB2VvN+DAYr6xQfb8CS2lpW4CgtAeEsAWgjkvbyyGvCmjTLAPAEMfF/JCr7/ c8P9raTPSqNexy65EPzsFOdG6kVk1K592cMDIy0cHhBebJPWF8fQ9egPpzwWXfBWSrCz Jk1zAXvG+gTTHY9iuktiuKZH9vWWl//5vaZrlx7ppzhO4sTAZlX2C/T/kVZYDrElUqcN VIOq5oDXrk5HHYGKLT0+ff2WZ+LnUZTUWEqoGOOJeX0XdIUXtb1PCt6iQWGnVWpEOeHv 9p5PFEhwRvitpIH0ba4n5ClWOCwYigDV+TgMORDfM82fnMfxgxqmD7OSd4a8lnQJEp7K YgYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=9ewNkq+k7WzF7N7FeKsJZWJsQUcIf4AaWPjf05A0Fco=; b=PzIwazqi3f5tV0aJ3iZjzY5hrBJnTiDwAF9AGJzVVNpbPu0AvZnLvQaEGCJAuPqfx6 OimMpE5lEQywdagKPC7boXJg2jjo2GevxVYpbFLGY9U4CTkUIyhMkJKWjZEYy4BIoubj 9zsaaVUlkfh2K6icUYZIeESzIOGiOlc0MlYRgGS+5X2CAvbJp7gjDGP+LBQRSEyuMyxs ewTsOU4srCKy3i+XC0PkG93zsyvN4sHK3C11r8Yq12kQR7esvJdSrytJSsUevLGGXSbW zaFIE1OD1aaNVgar+XWjR6UjjGCJgUYteJpPsSZwz28xbLdr7PN4k36xrFCfmaFn8vzi t/UQ== X-Gm-Message-State: APjAAAV2xNt0cmIVuDDsiYQ8mfkWjT4Elww0nHN0nSNW2mrnzz1gRcxL R37s/OC/1En1G/ptVhvYhHtszA== X-Google-Smtp-Source: APXvYqyg0YKjFTNIvTLCv1J1tDb1jq98QSviRK57/SbcLNfCJ0c+TDqSL8X9WHbEQTrvYD3q+/dxRw== X-Received: by 2002:a63:cb0f:: with SMTP id p15mr887811pgg.81.1573612938430; Tue, 12 Nov 2019 18:42:18 -0800 (PST) Received: from [10.83.36.153] ([217.173.96.166]) by smtp.gmail.com with ESMTPSA id r22sm395559pfg.54.2019.11.12.18.41.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 12 Nov 2019 18:42:17 -0800 (PST) Subject: Re: [PATCH 00/50] Add log level to show_stack() To: Sergey Senozhatsky 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> <20191112042546.GA119579@google.com> From: Dmitry Safonov Message-ID: Date: Wed, 13 Nov 2019 02:41:50 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <20191112042546.GA119579@google.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Wed, 13 Nov 2019 15:12:13 +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 , Petr Mladek , 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 11/12/19 4:25 AM, Sergey Senozhatsky wrote: > 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 don't strongly disagree, but if you look at those results: git grep 'printk("%s.*", \(lvl\|level\)' it seems to be used in quite a few places. Thanks, Dmitry 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 DB49CC17441 for ; Wed, 13 Nov 2019 02:42:24 +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 B205E2196E for ; Wed, 13 Nov 2019 02:42:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="pjfZkXyE"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=arista.com header.i=@arista.com header.b="httZFalB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B205E2196E Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=arista.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:Date: Message-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=TbZ0UNrR+MxzrP94Q/cIs0Zz/lK4Nomr5MSdPSVMyeQ=; b=pjfZkXyEFzdk6y LYfOF13IX5kA7GI1LyhVpnlJLKwvdzxYv0bIzeeFEivfRjk9Dvxt5EaFjUggsl3FOADife3Gm7eFM XqadPH39A3TUtcVSjtSTH2yojg2+SqZpt7oqI6ejyS+ZL6r0WquQEm91F86lQdBKbEctUuTnpTU3S axGcyVZQ8Sm/UgeynMI/YLB/ElGSDXjISsoQjae8nXCiNFQK/qVK6qdc47Ve0Jd+rIGBO67XWbk/x AooyDBvhDkw08CxNyKh2J4uJ+9BSVGOxhcNt6DhEyRnUG2RzYLcJroYqrz9SyhupYT6bFB+ZW7Iul kLiOvWqz1s0qOSt1Jilg==; 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 1iUibv-0006Ec-JK; Wed, 13 Nov 2019 02:42:23 +0000 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iUibr-0006Bb-Ms for linux-snps-arc@lists.infradead.org; Wed, 13 Nov 2019 02:42:22 +0000 Received: by mail-pf1-x442.google.com with SMTP id q13so563170pff.2 for ; Tue, 12 Nov 2019 18:42:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arista.com; s=googlenew; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=9ewNkq+k7WzF7N7FeKsJZWJsQUcIf4AaWPjf05A0Fco=; b=httZFalB2VvN+DAYr6xQfb8CS2lpW4CgtAeEsAWgjkvbyyGvCmjTLAPAEMfF/JCr7/ c8P9raTPSqNexy65EPzsFOdG6kVk1K592cMDIy0cHhBebJPWF8fQ9egPpzwWXfBWSrCz Jk1zAXvG+gTTHY9iuktiuKZH9vWWl//5vaZrlx7ppzhO4sTAZlX2C/T/kVZYDrElUqcN VIOq5oDXrk5HHYGKLT0+ff2WZ+LnUZTUWEqoGOOJeX0XdIUXtb1PCt6iQWGnVWpEOeHv 9p5PFEhwRvitpIH0ba4n5ClWOCwYigDV+TgMORDfM82fnMfxgxqmD7OSd4a8lnQJEp7K YgYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=9ewNkq+k7WzF7N7FeKsJZWJsQUcIf4AaWPjf05A0Fco=; b=qhzM6zQD9huhxzdBBqYpPmcEk1bGX2fNjBHqF8npfXQ9YxJXeRuHOy/oWAL0/Sc6Fk GLFBTTAflt/R1cG8UXLr9Q8ZQs1A7QuLjMsu7S8QNrT3sTUMzOgfvbyUvf0t5VQP9h2E h4vzRqii4Vx3msLADjFDeBx7igztxk4SEYaygubEvnu9qlFdjEf3DuLy01GN4jn2+M2o oMbE/b9xtfLJGzvXm/xGvf9r9/J3GFhPkl+y4MDl3vOypUDHcsVfRAHZJ3j08qMuFHdc qnmwyjmYiISq2bVTP0lYCIfdxd9a0/zukcCqJfPuP5KynqbtB3gmIKtH7uaTys15A/4f CkLA== X-Gm-Message-State: APjAAAWiByqMTJ0acUKAnYD/9MEyeZLDf2EqlWj9bwW/LPweuSTU/6ji m04Hrv1OO+OLxng2FEauX8/Ygg== X-Google-Smtp-Source: APXvYqyg0YKjFTNIvTLCv1J1tDb1jq98QSviRK57/SbcLNfCJ0c+TDqSL8X9WHbEQTrvYD3q+/dxRw== X-Received: by 2002:a63:cb0f:: with SMTP id p15mr887811pgg.81.1573612938430; Tue, 12 Nov 2019 18:42:18 -0800 (PST) Received: from [10.83.36.153] ([217.173.96.166]) by smtp.gmail.com with ESMTPSA id r22sm395559pfg.54.2019.11.12.18.41.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 12 Nov 2019 18:42:17 -0800 (PST) Subject: Re: [PATCH 00/50] Add log level to show_stack() To: Sergey Senozhatsky 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> <20191112042546.GA119579@google.com> From: Dmitry Safonov Message-ID: Date: Wed, 13 Nov 2019 02:41:50 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <20191112042546.GA119579@google.com> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191112_184219_745991_9B5E9B03 X-CRM114-Status: GOOD ( 15.22 ) 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 , 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 11/12/19 4:25 AM, Sergey Senozhatsky wrote: > 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 don't strongly disagree, but if you look at those results: git grep 'printk("%s.*", \(lvl\|level\)' it seems to be used in quite a few places. Thanks, Dmitry _______________________________________________ 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: Dmitry Safonov Date: Wed, 13 Nov 2019 02:41:50 +0000 Subject: [OpenRISC] [PATCH 00/50] Add log level to show_stack() In-Reply-To: <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> <20191112042546.GA119579@google.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: openrisc@lists.librecores.org On 11/12/19 4:25 AM, Sergey Senozhatsky wrote: > 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 don't strongly disagree, but if you look at those results: git grep 'printk("%s.*", \(lvl\|level\)' it seems to be used in quite a few places. Thanks, Dmitry From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [PATCH 00/50] Add log level to show_stack() 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> <20191112042546.GA119579@google.com> From: Dmitry Safonov Message-ID: Date: Wed, 13 Nov 2019 02:41:50 +0000 MIME-Version: 1.0 In-Reply-To: <20191112042546.GA119579@google.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit To: Sergey Senozhatsky Cc: 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 11/12/19 4:25 AM, Sergey Senozhatsky wrote: > 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 don't strongly disagree, but if you look at those results: git grep 'printk("%s.*", \(lvl\|level\)' it seems to be used in quite a few places. Thanks, Dmitry From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dmitry Safonov Subject: Re: [PATCH 00/50] Add log level to show_stack() Date: Wed, 13 Nov 2019 02:41:50 +0000 Message-ID: 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> <20191112042546.GA119579@google.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:Date: Message-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rLh7Q3GdiOOnXztTmb+NTAb+Wh+Y3hEa8ZnAFymAzVc=; b=RAeQL7WJnGNv4+ GVRE3f6r+ph8NVKKzr7TopfFmQ+hGX116RGQTwPjZx/hgpiFoDX6ur/kYP41Ae4ncHawPS8+qVUq5 RFjHfwVt4jkjzp0VG0Pa8dOmbBVwEQtD/H5S4nlWz/07fyYhL92tMprdPt6KOKsb0bpidNGts1Pdm S/6OixtTCSoaUDNZKXSLRW8xvNXNTSRvcwSNeaFqD8Jwfrrhj7FL+2mfnRw6M18HDrjt1PYp3HY1s hAouTcL7YlssVNeciEZlYhpzk8Af0BFgXUUXxbbq8xEgEyp3X1LkzIR4c56LQjmkGwpmDfIseVFLH v2syWlxIQYsk6R0NkP6A==; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arista.com; s=googlenew; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=9ewNkq+k7WzF7N7FeKsJZWJsQUcIf4AaWPjf05A0Fco=; b=httZFalB2VvN+DAYr6xQfb8CS2lpW4CgtAeEsAWgjkvbyyGvCmjTLAPAEMfF/JCr7/ c8P9raTPSqNexy65EPzsFOdG6kVk1K592cMDIy0cHhBebJPWF8fQ9egPpzwWXfBWSrCz Jk1zAXvG+gTTHY9iuktiuKZH9vWWl//5vaZrlx7ppzhO4sTAZlX2C/T/kVZYDrElUqcN VIOq5oDXrk5HHYGKLT0+ff2WZ+LnUZTUWEqoGOOJeX0XdIUXtb1PCt6iQWGnVWpEOeHv 9p5PFEhwRvitpIH0ba4n5ClWOCwYigDV+TgMORDfM82fnMfxgxqmD7OSd4a8lnQJEp7K YgYw== In-Reply-To: <20191112042546.GA119579@google.com> Content-Language: en-US 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: Sergey Senozhatsky 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 11/12/19 4:25 AM, Sergey Senozhatsky wrote: > 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 don't strongly disagree, but if you look at those results: git grep 'printk("%s.*", \(lvl\|level\)' it seems to be used in quite a few places. Thanks, Dmitry