Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp9538698ybl; Thu, 26 Dec 2019 00:39:21 -0800 (PST) X-Google-Smtp-Source: APXvYqwte9z61e7FIZxofz/z2mBBgHMeha+zn7h8dIQSXNxh1t7OnoBaaM2UKYg7+gK0BGpycRiV X-Received: by 2002:a9d:7757:: with SMTP id t23mr51510716otl.315.1577349561495; Thu, 26 Dec 2019 00:39:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577349561; cv=none; d=google.com; s=arc-20160816; b=mM3qxkIHykt8XIBLlVRyXQhRl9bxb8fqVsOAzSSrcL885v0ds4TttGDYNJXHRFZwfu uOhAf85yj7psJINYLbqN8IjvywBsTY+scWg8Cg0Hoss5P2QH9qDC92mtQHTdDAJ6svrB dqX1tGSCBmeoLg8SZQ+s3mLzdURW7v5ZXvYITaVmPul8/PopsIOaheg0tndbZdDTYAml laYQIOVHvwtGzwtNCz1wT/cdTgAutl0eoR74+H5tCiqYXLN8vAb4O/4iyvAqo+ZGC4vJ LGNSv65BKee2IDTwsPcX1EFuODkGR/otmWjDSxU9cC1DyFocZ8id9ilfwdUgL1gLzuXl jZ6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=zNULDzr74eWDPZKBoajgfQ+SJNDu2NIGQomyGtTsLuM=; b=NDOSj+jBryJfQiAg3lgKLkM9+bTqKyjTsa8m3ZdyBfOoUpdTpwRLsDYYZxhegOFjMJ WqD22aDbleeLbioU7JgSEjTaP3dVMfCJQBFbkEIIp+BoRYx+TrEIAOdNIZa0v+qD8ptG i1f5DzNLtF3sgVrCwdugaYBkanRL++a6RXGziWH67q9anTVC5FDZfKNyxA/JouHGscJX HBxALLbhyxbGaD1Zt4wCnfzcDe0yeV4zB6lDy6OSppCsktO62Pd7HM6f3WIBxvXulGp0 luUv/gSqCcKUegZ64XCow3RPqIPikhEFOsNogcgYIf+PJsK6oEGMY56b10uiTF1sKh8Z sEqg== 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 c11si10401043otf.91.2019.12.26.00.39.09; Thu, 26 Dec 2019 00:39:21 -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 S1726566AbfLZIiO (ORCPT + 99 others); Thu, 26 Dec 2019 03:38:14 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:8185 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726460AbfLZIiO (ORCPT ); Thu, 26 Dec 2019 03:38:14 -0500 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id C9991AB0110524FB17B9; Thu, 26 Dec 2019 16:38:11 +0800 (CST) Received: from euler.huawei.com (10.175.104.193) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.439.0; Thu, 26 Dec 2019 16:38:00 +0800 From: Wei Li To: , , , , , , , CC: , Subject: [PATCH] sched/debug: Reset watchdog on all CPUs while processing sysrq-t Date: Thu, 26 Dec 2019 16:52:24 +0800 Message-ID: <20191226085224.48942-1-liwei391@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.104.193] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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(); print_cpu(NULL, cpu); - + } } /* -- 2.17.1