Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp18072891ybl; Thu, 2 Jan 2020 17:55:59 -0800 (PST) X-Google-Smtp-Source: APXvYqwb1deuuyAtQ/79iJzpu/qX5DTa7VIZfx1smSVM/tOuBUJUl/g3erTafvBhh4f4SmSDHWSh X-Received: by 2002:a9d:53cb:: with SMTP id i11mr98055456oth.158.1578016559782; Thu, 02 Jan 2020 17:55:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578016559; cv=none; d=google.com; s=arc-20160816; b=FjJZ8RX+80RV4oNnSr+GHcJGsg1BE7pvLIkWTG7XD2OnOvfz6IwqkhVstndPB66PIU p4CQ+kPeQMYzg6BtPYULGUps2GY3nrKjLor8wBV+Iqz0L3kufN8blCbCpVgIrOuH+CD5 HrCP5Ueh6cDIn66/y9WdFz8mLZlmSrgPma1j6C8rMvdBQigORRZEilEkdczKOQCp5oi1 elsTpqsBYWjQVypzirQgVI26q8Zm80ZNVu2+eb1+hX+9TQO8z6SZhVCJGhAZqO5dvcFe dNKAKwU5NfSx11h85kRc0mY+kddYI27Q3kYyQoCiPhqQrXNkPAl9OO4RzOLHJJR+n8we vwqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=/KeIJdMs3PHBzL6zo9R63nMaWOVs5a53oZdxK9kOJ8s=; b=kYX8CNUPAuDIpR3sL00ZHMNUszI7rGoiJocw31xJw9AuO9S7EQHA/dG1GyDtdZJudH N7pldITmgFRRuC60pxujUf6es8EleK9sL8EEXbCnlXclja4uGSo32hZ0GyfVnT+DFNcE CBSV8Xz6vrBWVMd2lZSD5Co1hMhfQYj+/0jktPyfgHg7vxy6WLmcBcc6kG8h51UN3qAa iOfn6KH/uVoHH1HsDNWxgdj/mE1ReBOIWJEsh5qb8Bt7bKKm4rfUb08YmpOI3YNshCCl 5lQsO8nQYARVk11rH1RVOBG86k22lY/Wk1wxxCKVWT/ibhZWdvMhmXfBXKLmm9YQbF80 qBKA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y9si31617166otq.315.2020.01.02.17.55.47; Thu, 02 Jan 2020 17:55:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726148AbgACBy5 (ORCPT + 99 others); Thu, 2 Jan 2020 20:54:57 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:36148 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725943AbgACBy4 (ORCPT ); Thu, 2 Jan 2020 20:54:56 -0500 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id B2C9AD4C78F1B0342155; Fri, 3 Jan 2020 09:54:54 +0800 (CST) Received: from [127.0.0.1] (10.173.221.196) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.439.0; Fri, 3 Jan 2020 09:54:45 +0800 Subject: Re: [PATCH] sched/debug: Reset watchdog on all CPUs while processing sysrq-t To: Steven Rostedt CC: , , , , , , , , References: <20191226085224.48942-1-liwei391@huawei.com> <20200102144514.646df101@gandalf.local.home> From: "liwei (GF)" Message-ID: <2a7a9e51-bb25-3ed1-2643-e293e3ce5188@huawei.com> Date: Fri, 3 Jan 2020 09:54:44 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <20200102144514.646df101@gandalf.local.home> Content-Type: text/plain; charset="gbk" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.173.221.196] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Steven, Yes, it can be triggered on the Hi1620 system (128 cores) as follows: stress-ng -c 50 & stress-ng -m 50 & stress-ng -i 20 & echo 7 > /proc/sys/kernel/printk echo t > /proc/sysrq-trigger Then a soft lockup will be reported at migration thread [39636.303531] watchdog: BUG: soft lockup - CPU#67 stuck for 23s! [migration/67:348] which is waiting for the CPU handling sysrq-t to process stop_two_cpus. Thanks, Wei On 2020/1/3 3:45, Steven Rostedt wrote: > On Thu, 26 Dec 2019 16:52:24 +0800 > Wei Li wrote: > >> Lengthy output of sysrq-t may take a lot of time on slow serial console >> with lots of processes and CPUs. >> >> So we need to reset NMI-watchdog to avoid spurious lockup messages, and >> we also reset softlockup watchdogs on all other CPUs since another CPU >> might be blocked waiting for us to process an IPI or stop_machine. > > Have you had this triggered? > >> >> Add to sysrq_sched_debug_show() as what we did in show_state_filter(). >> >> Signed-off-by: Wei Li >> --- >> kernel/sched/debug.c | 11 +++++++++-- >> 1 file changed, 9 insertions(+), 2 deletions(-) >> >> diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c >> index f7e4579e746c..879d3ccf3806 100644 >> --- a/kernel/sched/debug.c >> +++ b/kernel/sched/debug.c >> @@ -751,9 +751,16 @@ void sysrq_sched_debug_show(void) >> int cpu; >> >> sched_debug_header(NULL); >> - for_each_online_cpu(cpu) >> + for_each_online_cpu(cpu) { >> + /* >> + * Need to reset softlockup watchdogs on all CPUs, because >> + * another CPU might be blocked waiting for us to process >> + * an IPI or stop_machine. >> + */ >> + touch_nmi_watchdog(); >> + touch_all_softlockup_watchdogs(); > > This doesn't seem to hurt to add, thus. > > Reviewed-by: Steven Rostedt (VMware) > > -- Steve > >> print_cpu(NULL, cpu); >> - >> + } >> } >> >> /* > > > . >