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.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,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 E85C4C2D0E4 for ; Tue, 24 Nov 2020 03:22:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8B98A2085B for ; Tue, 24 Nov 2020 03:22:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728985AbgKXDWP (ORCPT ); Mon, 23 Nov 2020 22:22:15 -0500 Received: from szxga02-in.huawei.com ([45.249.212.188]:2500 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726964AbgKXDWP (ORCPT ); Mon, 23 Nov 2020 22:22:15 -0500 Received: from dggeme756-chm.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Cg8Sz5YZwzQk3x; Tue, 24 Nov 2020 11:21:55 +0800 (CST) Received: from [10.174.177.103] (10.174.177.103) by dggeme756-chm.china.huawei.com (10.3.19.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1913.5; Tue, 24 Nov 2020 11:22:12 +0800 Subject: Re: [PATCH -next] panic: complete the flush of the hard deadlock log messages to the serial port To: Andrew Morton CC: , , , , , , , , , , , References: <20201123131359.34600-1-xuqiang36@huawei.com> <20201123115235.74aab2449ac5cf27f10a4cfd@linux-foundation.org> From: "xuqiang (M)" Message-ID: <080e8065-c696-eeec-3390-13b4458f67b6@huawei.com> Date: Tue, 24 Nov 2020 11:22:11 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <20201123115235.74aab2449ac5cf27f10a4cfd@linux-foundation.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.177.103] X-ClientProxiedBy: dggeme714-chm.china.huawei.com (10.1.199.110) To dggeme756-chm.china.huawei.com (10.3.19.102) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2020/11/24 3:52, Andrew Morton 写道: > 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? > > > . The fear that there may be some unexpected abnormal situation, resulting in the serial port has been occupied without release. Thanks         Xu.