Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp4424406pxb; Mon, 21 Feb 2022 21:11:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJwmM0mPz9FVbyrlni5iK6Y0RNzFk3W2wA34N9pr5NM9RWsu74YpnKx0BdljYw6dxRz960qi X-Received: by 2002:a63:474f:0:b0:374:7607:e45 with SMTP id w15-20020a63474f000000b0037476070e45mr1948528pgk.234.1645506673528; Mon, 21 Feb 2022 21:11:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645506673; cv=none; d=google.com; s=arc-20160816; b=1LjqwrJZSf2ZRPAHxT8Vtk4Pt60hKwOesCv6ttTpmH1HyNkMFSOCx8qq1y56qU4Ebc uV8PgLGWm/GSdkKqa4Y2Gx9xu8UcgymjgokIaFs2kegz4QR82mcLM45l5MJibIcgH/XL 9X8oFY7bdVm6Csj3z27sdtGi1qjBPV875ShRJxSkGVAwp1vNucDuQd+AIZBBPo9SOpHk uIx9KfAmRflv+xBiRA51ovramnl4j41Q0Sbf+Jlm2hTZ1OPpPXDOyi0xsjhv1Pw1w1Ix H8tHHG7jR81kWfHDLqMLKcw9fsvkno07odwtGkMk/c5l2MuHWmHsXelbil8oNKrTEvg7 SM8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=WpheS558QebQmAzCqdnB2qwELzokfGBgEVFRE8fJ3OU=; b=toBmgGHI5jN1Y+IUwIsimuaLiu9RsOjlYljG4buu9Fmg+yZsYy0f6FtmEWN+M79stb 1CLswNrQFQOBelgIaa9UC/PJaU0vzg8vnSj7YrcOshigFsfoXO+I9hJsyfUYR1qOqsna Du+nv+VeGSBcqivkMNp58AUIP+fhnIRCdaxLbGSwjoEgbPGyn6VJ+liY1ChvbDHyCUi6 Fta2o9WWaRvey/V9/F+izmWLZTnEq4JWJiUIEEaEDfnrfEtZ42R1Zrhi1yZAKA3aJYBV nNpxVt/MS9dTrphHGQiC9jWmRoQIyWnxcgP37E+mNIx4WtJkAMqZikvf+uYva0t5l43T bJug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=HstUXHaa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id s21si18246269pgs.540.2022.02.21.21.11.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Feb 2022 21:11:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=HstUXHaa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5EC3ECD5EF; Mon, 21 Feb 2022 20:44:04 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238901AbiBVCHR (ORCPT + 99 others); Mon, 21 Feb 2022 21:07:17 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:37952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238893AbiBVCHQ (ORCPT ); Mon, 21 Feb 2022 21:07:16 -0500 Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFA7DF18 for ; Mon, 21 Feb 2022 18:06:51 -0800 (PST) Received: by mail-pf1-x42c.google.com with SMTP id y11so10447731pfi.11 for ; Mon, 21 Feb 2022 18:06:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=WpheS558QebQmAzCqdnB2qwELzokfGBgEVFRE8fJ3OU=; b=HstUXHaaGOFOwZp7qatCSERoH2HZ/h8eUJPfiv/15pdXJCfyt7a5t+mthYg7vGe//I N6wD5z6KhzSkPPt32sSyZVM0GuorITATsIt2MLsi59flQqFGhyjqT14hIz39kciaVnnC rGg7Of8TAfijYfh3UVhgDaymWDa9dR/w5NnaY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=WpheS558QebQmAzCqdnB2qwELzokfGBgEVFRE8fJ3OU=; b=n+A+N6MTLyFCEJQd2WBf7kVvo6WbTCKHCMTJ7BUCyRhSs6/1vH6jCSRlzKWtT38YMN BT/St88f7O1JkogV45UEXLS/+oq5UBUa+8uB1InFjCxMG739PboQrmx/0/WtrtBGiub6 waBC10ZmHDuZrH9zQ+p6UCl+k89WJPT8btPFX4eF2IICXROUrcYD3JXO02yDKvW/34WL lgPyr9H1B/+nY0pONMNtstfVbxyljdVSDsCQQUcq6KyVZMYYIZ17x+P87sV0+Vv2IbkG 7Jk0I8aLfCFoMXoTJbGiPLKktZnmP5Uor4m5bEXPCq19XG6YvE+9pDcCk6JOYXl3NKxR QzCw== X-Gm-Message-State: AOAM530gTMdj1tQvlswDlHW1Fh5S1WHMb8OkqQDoaRqsqAp4Dh4jgldf QxeDBDbSQva0UmA+cbI9JfQfhQ== X-Received: by 2002:a62:e917:0:b0:4e0:1646:3b82 with SMTP id j23-20020a62e917000000b004e016463b82mr22736008pfh.57.1645495611127; Mon, 21 Feb 2022 18:06:51 -0800 (PST) Received: from google.com ([2401:fa00:8f:203:3f16:2239:960e:24f]) by smtp.gmail.com with ESMTPSA id h9sm14317305pfv.135.2022.02.21.18.06.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Feb 2022 18:06:50 -0800 (PST) Date: Tue, 22 Feb 2022 11:06:44 +0900 From: Sergey Senozhatsky To: "Guilherme G. Piccoli" Cc: linux-kernel@vger.kernel.org, bhe@redhat.com, pmladek@suse.com, akpm@linux-foundation.org, anton@enomsg.org, ccross@android.com, dyoung@redhat.com, feng.tang@intel.com, john.ogness@linutronix.de, keescook@chromium.org, kernel@gpiccoli.net, kexec@lists.infradead.org, rostedt@goodmis.org, senozhatsky@chromium.org, tony.luck@intel.com, vgoyal@redhat.com Subject: Re: [PATCH V6] panic: Move panic_print before kmsg dumpers Message-ID: References: <20220214141308.841525-1-gpiccoli@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220214141308.841525-1-gpiccoli@igalia.com> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (22/02/14 11:13), Guilherme G. Piccoli wrote: > > The additional messages from panic_print could overwrite the oldest > messages when the buffer is full. The only reasonable solution is to > use a large enough log buffer, hence we added an advice into the kernel > parameters documentation about that. By additional panic_print messages you mean that panic_print_sys_info() will print everything (except PANIC_PRINT_ALL_PRINTK_MSG) twice? Do we really need to dump everything twice? show_mem(), show_state(), ftrace_dump(DUMP_ALL). That's quite a bit of extra data. Can instead this be something like (?): @@ -286,6 +289,8 @@ void panic(const char *fmt, ...) */ atomic_notifier_call_chain(&panic_notifier_list, 0, buf); + panic_print_sys_info(panic_print & ~PANIC_PRINT_ALL_PRINTK_MSG); kmsg_dump(KMSG_DUMP_PANIC); /* @@ -316,7 +321,7 @@ void panic(const char *fmt, ...) debug_locks_off(); console_flush_on_panic(CONSOLE_FLUSH_PENDING); + panic_print_sys_info(PANIC_PRINT_ALL_PRINTK_MSG); if (!panic_blink) panic_blink = no_blink;