From patchwork Wed Feb 1 13:29:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: fuyuanli X-Patchwork-Id: 51331 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp286019wrn; Wed, 1 Feb 2023 05:46:50 -0800 (PST) X-Google-Smtp-Source: AK7set+hS8fX/h0lK6wPe1NP03I/qGzp14WYmjTtUDBQG/ancmQ6WRdYliztB++QO9TiidCqY7Ob X-Received: by 2002:a17:907:9950:b0:878:5bce:291e with SMTP id kl16-20020a170907995000b008785bce291emr2611134ejc.2.1675259210596; Wed, 01 Feb 2023 05:46:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675259210; cv=none; d=google.com; s=arc-20160816; b=rBTWjc5aEG1OqFGIleIrCxqnUcPVFFgVSRTYNboGK9lWWabBkmGi5+tYlQT/R09iRR tkKiJ9TODP5NLCaK4Gjdc7OQOapqJrjv5JRatwzP7ZQoLuTjxj32VFNo5qCKVw1cSgYN D3WZXCFklZSNAcLllYB/dm7sLuDhjW2i4rlhc+/Ck2z/gzS8FRwVNDndZLY+UG+Zp5HW XbBDhL1OzEUMe9DvsmjqZZDLC7c37yUU2+4El2H4/ac3ayoU0ZGo1BnIjErGx8gqF3ir nA8UyVXgX9yk9AuxKTsT7t5+jnCm9PPxpfpk62R2lbisSLZfmYQjO0u+vRGZn+B5g/vj 2mqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:content-disposition:mime-version :mail-followup-to:message-id:subject:cc:to:from:date; bh=M0Xhgnb7X8UunkabPGRaJz4dCUkCTQSZyqTx4Tc5Cjo=; b=xD8oMs7dxWR0KXiaxixHiAPKsU8/ZlAdv3it5K8pfrpw9PBscrcTkuBbaiqqUFLc9y YIQyLMUQvfvjUGzUPTdRQOLVwQxUfjnILIFM73zCpboncCoO4HgCQyRFaV2R96qnjzcw hOO0CBS41GnoB34ALNQx3GfC7kQrhwHBDOk6Rp5dnbqA/FiqH07rMIxLDF6GfP6nHMYG /mOsrEAmxz6SeVNtW5+7jo7VygvYm2yQVduLLSSCHKBDxauk77X9BNX1EAOAzbxj3NFN ky4YRAeeu2NTsGBAu2lDsfkz9sktWnArSjNGVS48bxoGzRKfR9SKpVqWot2VfmkskscU e+rA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 19-20020a17090600d300b0084d34979417si24958146eji.323.2023.02.01.05.46.26; Wed, 01 Feb 2023 05:46:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232460AbjBANdM (ORCPT + 99 others); Wed, 1 Feb 2023 08:33:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232380AbjBANcv (ORCPT ); Wed, 1 Feb 2023 08:32:51 -0500 X-Greylist: delayed 139 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 01 Feb 2023 05:32:24 PST Received: from mx6.didiglobal.com (mx6.didiglobal.com [111.202.70.123]) by lindbergh.monkeyblade.net (Postfix) with SMTP id F160F65EE8 for ; Wed, 1 Feb 2023 05:32:24 -0800 (PST) Received: from mail.didiglobal.com (unknown [10.79.65.12]) by mx6.didiglobal.com (Maildata Gateway V2.8) with ESMTPS id 39477110045205; Wed, 1 Feb 2023 21:30:03 +0800 (CST) Received: from didi-ThinkCentre-M920t-N000 (10.79.64.101) by ZJY02-ACTMBX-02.didichuxing.com (10.79.65.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 1 Feb 2023 21:30:02 +0800 Date: Wed, 1 Feb 2023 21:29:51 +0800 X-MD-Sfrom: fuyuanli@didiglobal.com X-MD-SrcIP: 10.79.65.12 From: fuyuanli To: , , CC: Subject: [PATCH] hung_task: Print message when hung_task_warnings gets down to zero. Message-ID: <20230201132951.GA382@didi-ThinkCentre-M920t-N000> Mail-Followup-To: pmladek@suse.com, akpm@linux-foundation.org, linux@rasmusvillemoes.dk, linux-kernel@vger.kernel.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [10.79.64.101] X-ClientProxiedBy: ZJY01-PUBMBX-01.didichuxing.com (10.79.64.32) To ZJY02-ACTMBX-02.didichuxing.com (10.79.65.12) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756636601985493316?= X-GMAIL-MSGID: =?utf-8?q?1756636601985493316?= It's useful to report it when hung_task_warnings gets down to zero, so that we can know if kernel log was lost or there is no hung task was detected. Signed-off-by: fuyuanli --- kernel/hung_task.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/hung_task.c b/kernel/hung_task.c index bb2354f73ded..ff479c51143d 100644 --- a/kernel/hung_task.c +++ b/kernel/hung_task.c @@ -142,6 +142,8 @@ static void check_hung_task(struct task_struct *t, unsigned long timeout) if (sysctl_hung_task_all_cpu_backtrace) hung_task_show_all_bt = true; + if (!sysctl_hung_task_warnings) + pr_info("Future hung task reports are suppressed, see sysctl kernel.hung_task_warnings\n"); } touch_nmi_watchdog();