Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1285711pxb; Fri, 21 Jan 2022 14:22:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJyaYpz7BAKKObfjADesEXVv1nntni9jxASGZ/991VJqPC7FAOWujuuMS8G32Mhgz/tUlgxV X-Received: by 2002:a17:903:1211:b0:149:9809:77be with SMTP id l17-20020a170903121100b00149980977bemr5634541plh.133.1642803747127; Fri, 21 Jan 2022 14:22:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642803747; cv=none; d=google.com; s=arc-20160816; b=GIjEghTHw19Sb7KG4LVCZ6mtEJfYlAh3o6f+V2LvlX9t+rJWxk6XM/RPJWV9bXEBHe +/I0615KsMkxWHOu+44W1U4A0p6gtfzalZqMEJbVCvi3axLmywf5V7QbmcsKxUDAtN3m fR7cKOkRetKEPanv87t12j0XnNcnzkf3wAcHPwi2f8eVmbqghIjE/CwtStkSP+HlgaQz ldfD+rARia+RW6NCV8MhH/HSweovZV5fA0B+RTZW4jY+bUnIG2rgIktHBG1xK5FiVwcy s1BySX2YFvbF6U8RgATUyAsUBY/efp0Kd9FRZFLZjqnkawjiQgfhxsQpmaoNTyVSkvNy /JQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=hTTIoKDQe0uKDwlKxKFNYq4zkC7rRGIvXgj05n1s++4=; b=T2fKygVl0uNUo/IL985zRM9si+GFP2RwV/FjQc3QPDKjlUb2Wfs1fFhM/0aVxaqvEc 69UTLfK5G1ZozwSdXRKho5mVlFF2AOtn+Z9vrNBdCjhBcEzGBnjxuGIozJ48gDDG3gkQ rUBZfVpHxwF8LsklL1fwk8J5f47PeYe5PjV3lWyiI8SdlDEUQIx3Bg8PKiP7/hZovNkh gzlnt35pN+Oo1tQqzPAw2J+5rULeDIaXOqMUKkxwTPiTU/3dyG2x7Nmxkc0eHH+7pMwo RL8kc6Cmye7x1RjdmveincbQrUb8vxEV+D7KYMrAWLKulcNHMYLon6mz6W8RGD12onp5 nEBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=gpiLWnMT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g18si7575779pfv.169.2022.01.21.14.22.14; Fri, 21 Jan 2022 14:22:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=gpiLWnMT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376789AbiATPvw (ORCPT + 99 others); Thu, 20 Jan 2022 10:51:52 -0500 Received: from fanzine2.igalia.com ([213.97.179.56]:37778 "EHLO fanzine2.igalia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235621AbiATPvv (ORCPT ); Thu, 20 Jan 2022 10:51:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=hTTIoKDQe0uKDwlKxKFNYq4zkC7rRGIvXgj05n1s++4=; b=gpiLWnMTEWdS8YrXW2tzskQvA3 SU1Pzwgmm2jDi0zXhMdQwSl+JRJ1jzFLkevBI9g6arnlP4T6u8RwU6byZKWp5t4ldEnEXhsoCycOi 4Nfsk2XaXp4+C8/uA9RKJcsTphKfdRVWRA/6AaaYbsDgZlAtJy3VbdCQ2hV0unzmmesz6pWzAvLeN r79BTxBA27NyUW9W5kxpxQ2rHJqFxVtP1zs2y9r08Q0G7IY3HDTERjvezi+zPQtOlghAFpc/vznjn xfwWdnyTEWbH2asbc4jdhkQ57W98XMtccNniGWc0DzDdSkHT8ajKDhZdR/z5xKBNrV0Gv3uNQIA8Y K8Gls8hQ==; Received: from [179.98.77.138] (helo=[192.168.1.60]) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_128_GCM:128) (Exim) id 1nAZiu-00014r-D0; Thu, 20 Jan 2022 16:51:40 +0100 Message-ID: <4de89aeb-c127-908c-b403-f9cea128a0b0@igalia.com> Date: Thu, 20 Jan 2022 12:51:11 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH V3] panic: Move panic_print before kmsg dumpers Content-Language: en-US To: Petr Mladek Cc: Baoquan He , linux-kernel@vger.kernel.org, akpm@linux-foundation.org, kernel@gpiccoli.net, senozhatsky@chromium.org, rostedt@goodmis.org, john.ogness@linutronix.de, feng.tang@intel.com, kexec@lists.infradead.org, dyoung@redhat.com, keescook@chromium.org, anton@enomsg.org, ccross@android.com, tony.luck@intel.com References: <20220114183046.428796-1-gpiccoli@igalia.com> <20220119071318.GA4977@MiWiFi-R3L-srv> <94bb12a2-a788-cee6-7d4f-dc0ac581fb39@igalia.com> From: "Guilherme G. Piccoli" In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20/01/2022 06:39, Petr Mladek wrote: > [...] > It makes perfect sense to disable the watchdogs during panic(). > For example, rcu_panic() just sets a variable: > > static int rcu_panic(struct notifier_block *this, unsigned long ev, void *ptr) > { > rcu_cpu_stall_suppress = 1; > return NOTIFY_DONE; > } > > It is quick and super-safe. It might make sense to implement similar > thing for other watchdogs and do something like: > > void panic_supress_watchdogs(void) > { > rcu_panic(); > softlockup_watchog_panic(); > wq_watchog_panic(); > } > > It might be caller early in panic(). > For reference, I saw your great input about this subject in another related thread, which I think we should mention here: https://lore.kernel.org/lkml/Yel8WQiBn%2FHNQN83@alley/ > JFYI, there is an extension for the crash tool that might be able to read > the trace log, see https://crash-utility.github.io/extensions.html > > I haven't tested it myself yet. Thanks, nice to know =)