Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp4346673imd; Mon, 29 Oct 2018 23:52:08 -0700 (PDT) X-Google-Smtp-Source: AJdET5egyAutb9DqBdAg7QpfI9nKNFluG13mbBcVZYWyXWFUiw+6M3QoKLMzw0Uej/bqAJkvi3Zq X-Received: by 2002:a62:1fdb:: with SMTP id l88-v6mr1675522pfj.213.1540882328091; Mon, 29 Oct 2018 23:52:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540882328; cv=none; d=google.com; s=arc-20160816; b=bsRPQsHjdfHzQiP/TqbUofcnHCxk7OnCLJT5RsWIV1wupogfPaL9I+Jva5hcm26Gl9 JSwBxdcDM9Bc+mW4FbJJJjBNj4Ubl6v95PCb5lflRWL0p/pEfIY+xGXwflAOyQ6Kj+QP zZ+OZPgQbFLTnZqiMtVYahc85+dYIp0kDmgtdZYVqpjLsm+zC9QNrq0x37bY9SKhvmqK KIFKCdLL9mjD9BKRHbpYeQ2hVBO4A/NpGzA0sVI0/uEqIbPdsN27ar2Mgbuiz1jumqW8 WAeu/iP7IxwgDLI6E5A+1P81c0NvAsoDM+UMxCAN8yKFp3gauczMT/tdv49Nxd/g90Wu PXdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=lXyHnCpaYKKe3FrpaGg9J8He3xD+MssyuwM46anj0l8=; b=R/rk9Y+ZLl21JW+jhs8po4tid/q3TdtSzbRy6YJFondixXrQcn8v+lUMgHTII9QWsI F/aIYdm3e5Bz2gxQuVMJgnsgsHUtCVVxBv2WGHgaEAzD/hf1WfRWTVX88eXGKvY83XLa R0LC/wLl2UBeEepgpHo2W6XDllWrRct8qfEvVFVvqy9JI+EHgQaRlcOC71eUESKySTig ZSaR6BPeo4Euu4mVjuWCO1LbsA9pDxgCHB00Wj8p7oZnxi/e4fSrm0kqQCS+6PFe6koa jzwnhQnHoWMOt5Y2zCyG9bWf/qrsmIDCVuwFtNWmvA/xOHMJNX0hkgGUajTvW7Tj3TYl pvzg== 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 u12-v6si22316160plz.196.2018.10.29.23.51.52; Mon, 29 Oct 2018 23:52:08 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726476AbeJ3Pnp (ORCPT + 99 others); Tue, 30 Oct 2018 11:43:45 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:53174 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726154AbeJ3Pnp (ORCPT ); Tue, 30 Oct 2018 11:43:45 -0400 Received: from tmo-115-37.customers.d1-online.com ([80.187.115.37] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1gHNs7-0000xx-LM; Tue, 30 Oct 2018 07:51:27 +0100 Date: Tue, 30 Oct 2018 07:51:26 +0100 (CET) From: Thomas Gleixner To: Laurence Oberman cc: linux-kernel@vger.kernel.org, rdunlap@infradead.org Subject: Re: [PATCH] V6 init/main.c Enable watchdog_thresh control from kernel line To: loberman@redhat.com In-Reply-To: <1540410119-21120-1-git-send-email-loberman@redhat.com> Message-ID: References: <1540410119-21120-1-git-send-email-loberman@redhat.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Laurence, On Wed, 24 Oct 2018, Laurence Oberman wrote: your subject line reads a bit strange: Subject: [PATCH] V6 init/main.c Enable watchdog_thresh control from kernel line To: loberman@redhat.com Aside of that extra 'To:...', please move the V6 inside the square brackets together with PATCH so tools can strip off the whole thing. Also please refrain from using file path as a prefix. It's sufficient to use 'init' and please add a colon after the prefix to separate it from the short log string. 'kernel line' reads strange, that should be 'kernel command line'. > Both graphics and serial consoles are exposed to hard lockups > when handling a large amount of messaging. The kernel watchdog_thresh > parameter up to now has not been available to be set on the kernel line for > early boot. > This patch allows the setting of watchdog_thresh to be increased > when needed to avoid the hard lockups in the console code. git grep 'This patch' Documentation/process/ > Signed-off-by: Laurence Oberman > Acked-by: Randy Dunlap > --- > Documentation/admin-guide/kernel-parameters.txt | 7 +++++++ > init/main.c | 11 +++++++++++ > 2 files changed, 18 insertions(+) > > diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt > index 4cdcd1a..102382f 100644 > --- a/Documentation/admin-guide/kernel-parameters.txt > +++ b/Documentation/admin-guide/kernel-parameters.txt > @@ -4932,6 +4932,13 @@ > or other driver-specific files in the > Documentation/watchdog/ directory. > > + watchdog_thresh= > + This parameter allows early boot to change the > + value of the watchdog timeout threshold from the default > + of 10 seconds to avoid hard lockups. Example: > + watchdog_thresh=30 > + Default: 10 Describing a parameter with 'This parameter' is pointless. The 'early boot' extra is not really helpful either as the kernel command line parameters are evaluated during early boot. Changing this parameter does not avoid hard lockups, really. It changes the time which has to elapse for a lockup to be detected. Aside of that it does not only affect the hard lockup detector it also affects the soft lockup detector. You also fail to mention that setting this to 0 disables both lockup detectors completely. Something like this perhaps: 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. > --- a/init/main.c > +++ b/init/main.c > @@ -1038,6 +1038,17 @@ static int __init set_debug_rodata(char *str) > __setup("rodata=", set_debug_rodata); > #endif > > +#ifdef CONFIG_LOCKUP_DETECTOR > +extern int watchdog_thresh; > + > +static int __init watchdog_thresh_setup(char *str) > +{ > + get_option(&str, &watchdog_thresh); > + return 1; > +} > +__setup("watchdog_thresh=", watchdog_thresh_setup); > +#endif Why are you adding this to init/main.c? This really belongs into kernel/watchdog.c which also avoids the ifdeffery and the ugly extern. Then the subject line becomes something like this: [PATCH V$N] watchdog/core: Add watchdog_thresh command line parameter Thanks, tglx