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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 99091C63697 for ; Mon, 23 Nov 2020 19:52:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3AE0820719 for ; Mon, 23 Nov 2020 19:52:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="Uq/AsyZT" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731119AbgKWTwh (ORCPT ); Mon, 23 Nov 2020 14:52:37 -0500 Received: from mail.kernel.org ([198.145.29.99]:59990 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728631AbgKWTwh (ORCPT ); Mon, 23 Nov 2020 14:52:37 -0500 Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D4A5620717; Mon, 23 Nov 2020 19:52:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1606161156; bh=UAN5Zz2aRH8xlZWd7L9XToNiye4snbt2al5c9XjJUbc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Uq/AsyZTk5jY2L3oMtuPdv5WSIo+UAlgyg7hWNkQ9pwk9fCwGgPI925Drvj4tHrkM Yt9gx5KZ6a3DqzAtSGijnbmDw7E0rtQ0uIfZ+1i9KAxjrUlpjFKijdxKqeCKjiimVB NfkdJ1JCaXLBiDMWljHea4wBBoWypWexBlVQeYxw= Date: Mon, 23 Nov 2020 11:52:35 -0800 From: Andrew Morton To: Xu Qiang Cc: , , , , , , , , , , , Subject: Re: [PATCH -next] panic: complete the flush of the hard deadlock log messages to the serial port Message-Id: <20201123115235.74aab2449ac5cf27f10a4cfd@linux-foundation.org> In-Reply-To: <20201123131359.34600-1-xuqiang36@huawei.com> References: <20201123131359.34600-1-xuqiang36@huawei.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 23 Nov 2020 13:13:59 +0000 Xu Qiang wrote: > when hardlockup_all_cpu_backtrace is on, and there are > a large number of cores in the system, it takes > a long time to output the hard deadlock logs of all cores > to the serial port. When the console_flush_on_panic function > in panic is executed, console_locked is still held. > As a result, garbled characters are displayed in the serial port log. > > To solve this problem, wait for a maximum of 10s for the serial port > to be released before console_flush_on_panic. Wouldn't it be better to wait until all the printing of all those backtraces has completed?