Received: by 2002:a05:7412:2a8a:b0:fc:a2b0:25d7 with SMTP id u10csp116123rdh; Tue, 6 Feb 2024 22:19:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IGEbImzDMEMq6zFl1Ezddl+imh3erfyCGIsO8AbVI4EV1J7R0bgBWZAmRhv9Nirq21Aurj1 X-Received: by 2002:a05:622a:88:b0:42c:3b1f:fe31 with SMTP id o8-20020a05622a008800b0042c3b1ffe31mr3383428qtw.35.1707286764886; Tue, 06 Feb 2024 22:19:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707286764; cv=pass; d=google.com; s=arc-20160816; b=hoHFqbykl9i4kl4jCeAhRQODOHLP3Jo2m5CwplYwl9mBa/h2MWfLRLe0hbB6v9WnfY VksaMFe9YLKtO3J/SFMvjwwx6O9x1o3U1TuVm3jC0BidzFRHF2fBJ+rH+NB3xfFJv5Rx ihD3WRsDnVLIXmyYe4UdtIz+WLo98iI3wq7hOVrASXaMNn0+7PDkaqq6fBGfMaWwt9by yPf6bX63cmsmoBe8s0pCmsWiupSlVSEyCw3SRAdyKP0XLujGQDSi0LGSQW9km8f28ECx Zw3Keb9qYvrkLfUGVWVVEgh9LGfC9PaN8MZrkRfjOoDZjEjLyd6TIBdGox6rq+w+KxDR 75lA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=7SrCJEJUbgaaO8LSY+S0f3ku7YdljvxpwznRF4B58Ig=; fh=O8bJrADKzBP/Aubu9/zscoKpHoXeZOTaJADEuSjsX54=; b=kzeI0hRghvV7ZK1r1jEAvLyA93UzAzXVFqpMHv+XDVRW4WsKmI6SLarXsvj0/e0oib 9kNCebdPvL4Pd1RELzJoTdePGDxsPChC/9xX+0JtQt2aKaPxdJTvhNq5D+NWspzByjqn pbQMsbtHMhHIs26MjPBvpWVWrB+kZOEsbe/OlDxlE7M7UhsrWP47TEnU1pn2dhoJ1KXa OWVuGNvrRdsLi/UeXbw3c05WktPrSOZLm/QB43l3MgJUEYc9HciSOJeRod+DCmJQmqum GD/lyqOUTW/26LE094jovSmr6ckMJve90r3JyX3DLWBlYwNOJX2DQxHDTo1ldRldvWMY 8gWg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=a3d45aJ4; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dkim=pass dkdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-56010-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56010-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.com X-Forwarded-Encrypted: i=2; AJvYcCWcy7CyRAV5sjBFQt9HnI8AoLLH8TGRLtZmxY5/ttylyGPb89xgO9QNo4QQAKXBKb7d573s8/vixW774RIOLv/cyl1X1NBKzhJrAxbD/Q== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id f37-20020a05622a1a2500b0042aa019739dsi541953qtb.277.2024.02.06.22.19.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 22:19:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-56010-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=a3d45aJ4; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dkim=pass dkdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-56010-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56010-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id A41B81C252A3 for ; Wed, 7 Feb 2024 06:19:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 982CC1CF99; Wed, 7 Feb 2024 06:19:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="a3d45aJ4" Received: from out30-124.freemail.mail.aliyun.com (out30-124.freemail.mail.aliyun.com [115.124.30.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4EB011CFB9 for ; Wed, 7 Feb 2024 06:19:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707286754; cv=none; b=B2ib0bjDAQyP77/Vu2ygX08t2hamP3qIVD7JolxiMrKs9WyO2nvFu43MIRBF/ssTTEfc7MX6HAVrkza1sPNuZgZAxQDrjWddnKqjdNs1ksXMJqmi/1atzpqYFtec7JemqTL5fIp5YIQ4ywY7LK0AOCEwmABd9munakOS+SAgCF0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707286754; c=relaxed/simple; bh=h6+bbngOw6Ohz7LqsUDrGXlKkg4OzH+vEbsYAMm1fic=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=hAiJsk9lTw4GIV1KmBcV/lQZ3fJ14YCCRkcmdAy48y/THZbswmfHs99XaUZ4uklcTXDvzWNlvFrCF9vsONnw8+pWJRMYO3WQNFrRifSwUXENP02ZF+HF+cidkSmR1YWYYuRmAF77NkOs32kddwHlk9H2L5gJIia3UZJvNEa6ltM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=a3d45aJ4; arc=none smtp.client-ip=115.124.30.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1707286749; h=Message-ID:Date:MIME-Version:From:Subject:To:Content-Type; bh=7SrCJEJUbgaaO8LSY+S0f3ku7YdljvxpwznRF4B58Ig=; b=a3d45aJ4HCb10DXaoslLB/5weQINaXdQn/O0C5lGgkGKEph2Xg+/4WiH8EvTcEhllA5lsXkqvTk0r1GWwpKM/eCQq79p1o7+pmXK2eA/WeNdJQ7YzFTOboo2dev0laaLmLSP5USo3v/QddDYTJHnXdaQebOA1KN0hpMdtocIzpw= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R191e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046059;MF=yaoma@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0W0Fmdax_1707286737; Received: from 192.168.0.104(mailfrom:yaoma@linux.alibaba.com fp:SMTPD_---0W0Fmdax_1707286737) by smtp.aliyun-inc.com; Wed, 07 Feb 2024 14:19:09 +0800 Message-ID: <92a6e940-560d-4a61-bfcd-27a2df369b0f@linux.alibaba.com> Date: Wed, 7 Feb 2024 14:19:08 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Bitao Hu Subject: Re: [PATCHv5 3/3] watchdog/softlockup: add SOFTLOCKUP_DETECTOR_INTR_STORM Kconfig knob To: Doug Anderson Cc: akpm@linux-foundation.org, pmladek@suse.com, kernelfans@gmail.com, liusong@linux.alibaba.com, linux-kernel@vger.kernel.org, yaoma@linux.alibaba.com References: <20240206095902.56406-1-yaoma@linux.alibaba.com> <20240206095902.56406-4-yaoma@linux.alibaba.com> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2024/2/7 05:42, Doug Anderson wrote: > Hi, > > On Tue, Feb 6, 2024 at 1:59 AM Bitao Hu wrote: >> >> The interrupt storm detection mechanism we implemented requires a >> considerable amount of global storage space when configured for >> the maximum number of CPUs. >> Therefore, adding a SOFTLOCKUP_DETECTOR_INTR_STORM Kconfig knob that >> defaults to "yes" if the max number of CPUs is <= 128. >> >> Signed-off-by: Bitao Hu >> --- >> kernel/watchdog.c | 2 +- >> lib/Kconfig.debug | 13 +++++++++++++ >> 2 files changed, 14 insertions(+), 1 deletion(-) > > IMO this should be squashed into patch #1, though I won't insist. Agree. > > >> diff --git a/kernel/watchdog.c b/kernel/watchdog.c >> index 26dc1ad86276..1595e4a94774 100644 >> --- a/kernel/watchdog.c >> +++ b/kernel/watchdog.c >> @@ -338,7 +338,7 @@ __setup("watchdog_thresh=", watchdog_thresh_setup); >> >> static void __lockup_detector_cleanup(void); >> >> -#ifdef CONFIG_IRQ_TIME_ACCOUNTING >> +#ifdef CONFIG_SOFTLOCKUP_DETECTOR_INTR_STORM >> #define NUM_STATS_GROUPS 5 >> #define NUM_STATS_PER_GROUP 4 >> enum stats_per_group { >> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug >> index 975a07f9f1cc..74002ba7c42d 100644 >> --- a/lib/Kconfig.debug >> +++ b/lib/Kconfig.debug >> @@ -1029,6 +1029,19 @@ config SOFTLOCKUP_DETECTOR >> chance to run. The current stack trace is displayed upon >> detection and the system will stay locked up. >> >> +config SOFTLOCKUP_DETECTOR_INTR_STORM >> + bool "Detect Interrupt Storm in Soft Lockups" >> + depends on SOFTLOCKUP_DETECTOR && IRQ_TIME_ACCOUNTING >> + default y if NR_CPUS <= 128 >> + help >> + Say Y here to enable the kernel to detect interrupt storm >> + during "soft lockups". >> + >> + "soft lockups" can be caused by a variety of reasons. If one is caused by >> + an interrupt storm, then the storming interrupts will not be on the >> + callstack. To detect this case, it is necessary to report the CPU stats >> + and the interrupt counts during the "soft lockups". > > It's probably not terribly important, but I notice that the other help > text in this file is generally wrapped to 80 columns. Even though the > kernel has relaxed the 80 column rule a bit, it still feels like this > could easily be wrapped to 80 columns without sacrificing any > readability. OK. > > In any case: > > Reviewed-by: Douglas Anderson