Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp881025imd; Thu, 1 Nov 2018 07:03:42 -0700 (PDT) X-Google-Smtp-Source: AJdET5ckOyVqKti7eJhoqA7MkEm5rhJdblfEBYLvKFEPhD3Eb4hvEeqkwUyMBQPTwd73FVxeESPm X-Received: by 2002:a63:cd45:: with SMTP id a5-v6mr7451750pgj.43.1541081022301; Thu, 01 Nov 2018 07:03:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541081022; cv=none; d=google.com; s=arc-20160816; b=Aja9jf2k45JogXH43PE7gCmZEohr2M+/rg32E7hLXooRDFEBTkWnX4rX/+a8HMua4B +avGqQ3NSRCGbWIj63nAZtqEVokC9WkdeajLci9969onvwSVa7PxMUdxdZ24bR1v/lQv J5CINwaQBNtjL/Pzp0M6u4bve8ykfcl//ZIALN4xunMrxTExXtMtCI0cfG9jeTd+19sk QhNSJqN42wcEexUyhK+v7IKR9kpKXiQqvqO4xMUryQVH9htHymcKgXx0HGMSYUVtUh/k j4Q5EsnlhtR3lC0PaHBH4W4vyk7vrvCzFRVrYk27fVxjaKSrDC8RrA09K96rVXYii+Vy 1WWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=aBZUfFafPPxc2Y8P0kEuCotJVdYSvDkIEVhQrmgDJys=; b=UowoxSsuZY4xoLlMeLPUER/iKrG3sgwaEBDQNUn1NIBxSWGt+re7/B0TLucBodu0fV gDNdABlv3JCLeWDSea1nhEzQAQK9qrodHRG29vyTyA/TKZICAHJPQLgPqC0kBRli+qqy wmGu678BBS2YrhjmpToZNw8p3Xhb4l4s4ZE+mNzyK9rnhiAqhuvSIc5Y/aG8DJiXBohk POkL0zCH1qrid665T+xF5GupmPPa2DiqWdAzIEaq486+4auteYXGvuOvg/2Rot9XjsZf hLPMhrTMSuJUge+gn2frov9gaeDgDh3JWqnPyeAlH/ZlQ66K3VeD9erj+Owb3SnvkgBc rpUw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c2-v6si24436964pgm.467.2018.11.01.07.03.24; Thu, 01 Nov 2018 07:03:42 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728450AbeKAWdc (ORCPT + 99 others); Thu, 1 Nov 2018 18:33:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56114 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727644AbeKAWdb (ORCPT ); Thu, 1 Nov 2018 18:33:31 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C0E3F3084044; Thu, 1 Nov 2018 13:30:33 +0000 (UTC) Received: from loberhel74.redhat.com (ovpn-125-191.rdu2.redhat.com [10.10.125.191]) by smtp.corp.redhat.com (Postfix) with ESMTP id F2DD6600CC; Thu, 1 Nov 2018 13:30:20 +0000 (UTC) From: Laurence Oberman To: tglx@linutronix.de Cc: linux-kernel@vger.kernel.org, rdunlap@infradead.org, prarit@redhat.com, Laurence Oberman Subject: [PATCH V8] watchdog/core: Add watchdog_thresh command line parameter Date: Thu, 1 Nov 2018 09:30:18 -0400 Message-Id: <1541079018-13953-1-git-send-email-loberman@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Thu, 01 Nov 2018 13:30:33 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The hard and soft lockup detector threshold has a default value of 10 seconds which can only be changed via sysctl. During early boot lockup detection can trigger when noisy debugging emits a large amount of messages to the console, but there is no way to set a larger threshold on the kernel command line. The detector can only be completely disabled. Add a new watchdog_thresh= command line parameter to allow boot time control over the threshold. It works in the same way as the sysctl and affects both the soft and the hard lockup detectors. Signed-off-by: Laurence Oberman --- Documentation/admin-guide/kernel-parameters.txt | 8 ++++++++ kernel/watchdog.c | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index e129cd8..3dcfb78 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -4932,6 +4932,14 @@ or other driver-specific files in the Documentation/watchdog/ directory. + watchdog_thresh= + [KNL] + Set the hard lockup detector stall duration + threshold in seconds. The soft lockup detector + threshold is set to twice the value. A value of 0 + disables both lockup detectors. Default is 10 + seconds. + workqueue.watchdog_thresh= If CONFIG_WQ_WATCHDOG is configured, workqueue can warn stall conditions and dump internal state to diff --git a/kernel/watchdog.c b/kernel/watchdog.c index 977918d..8fbfda9 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c @@ -199,6 +199,13 @@ static int __init nosoftlockup_setup(char *str) } __setup("nosoftlockup", nosoftlockup_setup); +static int __init watchdog_thresh_setup(char *str) +{ + get_option(&str, &watchdog_thresh); + return 1; +} +__setup("watchdog_thresh=", watchdog_thresh_setup); + #ifdef CONFIG_SMP int __read_mostly sysctl_softlockup_all_cpu_backtrace; -- 1.8.3.1