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.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable 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 01504C41621 for ; Tue, 24 Mar 2020 13:04:45 +0000 (UTC) Received: from isis.lip6.fr (isis.lip6.fr [132.227.60.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8F929208CA for ; Tue, 24 Mar 2020 13:04:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="IBayBFhl" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8F929208CA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=cocci-bounces@systeme.lip6.fr Received: from systeme.lip6.fr (systeme.lip6.fr [132.227.104.7]) by isis.lip6.fr (8.15.2/8.15.2) with ESMTP id 02OD4TWt004824; Tue, 24 Mar 2020 14:04:29 +0100 (CET) Received: from systeme.lip6.fr (systeme.lip6.fr [127.0.0.1]) by systeme.lip6.fr (Postfix) with ESMTP id A7E7777FC; Tue, 24 Mar 2020 14:04:29 +0100 (CET) Received: from isis.lip6.fr (isis.lip6.fr [132.227.60.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by systeme.lip6.fr (Postfix) with ESMTPS id 5354A7749 for ; Tue, 24 Mar 2020 01:07:56 +0100 (CET) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e:0:0:0:133]) by isis.lip6.fr (8.15.2/8.15.2) with ESMTPS id 02O07sKt002410 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NO) for ; Tue, 24 Mar 2020 01:07:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description; bh=TEUZhCjfShs/MS4UZq1VHSw7JcuxY18OqcwtWtp0bLM=; b=IBayBFhlOFrtLI4GQitRSAxT4p YfYtYcm3rr9WoyfzPh1kErg35kzKMlOOaFuqQKuo2SC7JafYpPtats4RcJywhuZWw2mO0W20BIvYG iKBysCDo6RipS4Bxof13jZY9nZBTiCQ5LHNmE3MGBkoX9x79lnr8rJ2X+qMmNqrb82YvFHouNVpAA cNs8ZA/K/OV5+MileG370xj+Z2EJ990t/uP7EcykvTcmLVhFILIVRUfmBnM/1ed+6HoTqYNqfOhpv 1njFpvw5nt5FvWpMhLAlD/nz6o64Pgy31Mab9MJZXlUW4WHIBpvd+I768Z8Izmfql6fB+1ujFMsqH kIkgiB/g==; Received: from [2601:1c0:6280:3f0::19c2] by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jGWfJ-0008ER-S0; Mon, 23 Mar 2020 23:39:29 +0000 To: "Guilherme G. Piccoli" , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org References: <20200323214618.28429-1-gpiccoli@canonical.com> From: Randy Dunlap Message-ID: Date: Mon, 23 Mar 2020 16:39:25 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20200323214618.28429-1-gpiccoli@canonical.com> Content-Language: en-US X-Greylist: Sender IP whitelisted, Sender e-mail whitelisted, not delayed by milter-greylist-4.4.3 (isis.lip6.fr [132.227.60.2]); Tue, 24 Mar 2020 14:04:29 +0100 (CET) X-Greylist: Delayed for 00:28:17 by milter-greylist-4.4.3 (isis.lip6.fr [IPv6:2001:660:3302:283c:0:0:0:2]); Tue, 24 Mar 2020 01:07:55 +0100 (CET) X-Scanned-By: MIMEDefang 2.78 on 132.227.60.2 X-Scanned-By: MIMEDefang 2.78 X-Mailman-Approved-At: Tue, 24 Mar 2020 14:04:28 +0100 Cc: keescook@chromium.org, linux-doc@vger.kernel.org, penguin-kernel@I-love.SAKURA.ne.jp, linux-api@vger.kernel.org, kernel@gpiccoli.net, cocci@systeme.lip6.fr, tglx@linutronix.de, yzaikin@google.com, akpm@linux-foundation.org Subject: Re: [Cocci] [PATCH V2] kernel/hung_task.c: Introduce sysctl to print all traces when a hung task is detected X-BeenThere: cocci@systeme.lip6.fr X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: cocci-bounces@systeme.lip6.fr Errors-To: cocci-bounces@systeme.lip6.fr Hi, On 3/23/20 2:46 PM, Guilherme G. Piccoli wrote: > > .../admin-guide/kernel-parameters.txt | 6 ++++ > Documentation/admin-guide/sysctl/kernel.rst | 15 ++++++++++ > include/linux/sched/sysctl.h | 7 +++++ > kernel/hung_task.c | 30 +++++++++++++++++-- > kernel/sysctl.c | 11 +++++++ > 5 files changed, 67 insertions(+), 2 deletions(-) > admin-guide/kernel-parameters.txt predominantly uses "CPUs" for plural CPUs when not part of a cmdline keyword etc., so please adjust below: > diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt > index c07815d230bc..7a14caac6c94 100644 > --- a/Documentation/admin-guide/kernel-parameters.txt > +++ b/Documentation/admin-guide/kernel-parameters.txt > @@ -1453,6 +1453,12 @@ > x86-64 are 2M (when the CPU supports "pse") and 1G > (when the CPU supports the "pdpe1gb" cpuinfo flag). > > + hung_task_all_cpu_backtrace= > + [KNL] Should kernel generate backtraces on all cpus CPUs > + when a hung task is detected. Defaults to 0 and can > + be controlled by hung_task_all_cpu_backtrace sysctl. > + Format: > + > hung_task_panic= > [KNL] Should the hung task detector generate panics. > Format: > diff --git a/Documentation/admin-guide/sysctl/kernel.rst b/Documentation/admin-guide/sysctl/kernel.rst > index def074807cee..8b4ff69d2348 100644 > --- a/Documentation/admin-guide/sysctl/kernel.rst > +++ b/Documentation/admin-guide/sysctl/kernel.rst > @@ -40,6 +40,7 @@ show up in /proc/sys/kernel: > - hotplug > - hardlockup_all_cpu_backtrace > - hardlockup_panic > +- hung_task_all_cpu_backtrace > - hung_task_panic > - hung_task_check_count > - hung_task_timeout_secs > @@ -338,6 +339,20 @@ Path for the hotplug policy agent. > Default value is "/sbin/hotplug". > > > +hung_task_all_cpu_backtrace: > +================ > + > +If this option is set, the kernel will send an NMI to all CPUs to dump > +their backtraces when a hung task is detected. This file shows up if > +CONFIG_DETECT_HUNG_TASK and CONFIG_SMP are enabled. > + > +0: Won't show all CPUs backtraces when a hung task is detected. > +This is the default behavior. > + > +1: Will non-maskably interrupt all CPUs and dump their backtraces when > +a hung task is detected. > + > + > hung_task_panic: > ================ > thanks. -- ~Randy _______________________________________________ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci