Received: by 2002:a05:7208:13ce:b0:7f:395a:35b6 with SMTP id r14csp129901rbe; Wed, 28 Feb 2024 14:45:41 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXAsZ/ix4bWzJj7KM4di/5HOj+iFlExXKEGLr5xOBNLjEHn/78rRDLMPn6noQia707liY7NTFeM6fDCeXVHDEdoH8+3V3uu4cs1Q3hGhA== X-Google-Smtp-Source: AGHT+IEokk2NF51z/kDod4oDavQl7AuYNpx/8Qy3DUbgOKBSXftZurXA5qsnI+tkc9kXVWKEuCaM X-Received: by 2002:a17:90a:8c8c:b0:299:14e4:6579 with SMTP id b12-20020a17090a8c8c00b0029914e46579mr525712pjo.22.1709160340831; Wed, 28 Feb 2024 14:45:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709160340; cv=pass; d=google.com; s=arc-20160816; b=Zv5AYclrtgMuRBD70juecfjtTp4IoZPChhZtsLiWF1wvIz1TO9rbqChtnuCFl6UkhW 0H+KU8elWKUsoXbPq6x0OrYszeyNQIddZv0cX/BHMWjchKcEGtkB/6IGvhNwN7E0m0eE TeGJeKvKHvP5LDQ95VbKDvwaHvBZUhD0HU+m7PUHzlaKBSfRRlubZ8lkF8Op67FMC+// WUViVw3SSYqZ7k1kjbiAcfzOLJ9G0N7SAwX8WFFJT1OTUEQhh95ozgkqW+iCwDz7Lj6S SYQj1oX3er8XxuQ3DapcjsW1qebM13xloUOQsLzE34ddxqYSPvBoPfeMd7y8EPa5bwtz 5TZw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=VxABPZ28o1U9eMcO7y1qUMLxndBrASNoz0KbMJJ/fIg=; fh=F0h3FJxsHanoSbR2Rs+fl/732TO8tlrXv5aoDeP8kt8=; b=YNaT0a0pBFCqJ04tGWjfGdhSNpcH8oBe7NNXshiiWiOSRILzBSbgp4k+LL66jaxOiN asF4iW3WLOs5q9JV2aGOrlT0yZ2sn1hOQrQ99oN2xzP64pivHzzZf2jyrUG0O1Mxv9rJ P5Bv95hzdExtodv3cl2SDkZwSMY2mur1ASToDNTTm9kOvp2dykgiJwcHyZUgV1q2Nl7d NhDB9fFqUnJ3ivbpekWWN08zQDEOgxc65k44y8YYDUg0Tg0sD5y2n7BOOvk1hs4RxeMB hfuiHMFNT0bVCj0n674/YPyyXwrPGWM1HxPZ1Ch3DDYfSXkB4S6cMsjhyO14HkXRPvYg O2xw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=YKz4xn2w; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-85797-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85797-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id hk17-20020a17090b225100b0029701ed7d80si145119pjb.115.2024.02.28.14.45.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 14:45:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85797-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=YKz4xn2w; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-85797-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85797-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 8706228A143 for ; Wed, 28 Feb 2024 22:45:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DCF1672902; Wed, 28 Feb 2024 22:45:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="YKz4xn2w" Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3E17F71ECC for ; Wed, 28 Feb 2024 22:45:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709160322; cv=none; b=YODO0qikiXtbDwLVamHxbbucXYiq7qB3XTgdS+XH1h15Xl/HFSjrjHXLoH5rBBcKI+9gbypua2aGqL6/n8RSJpEu/wdPPHMTc0j/euhjyx/WksYQ/dwmQyk+LgoCDMgGUZ0/QDv/TDRmE4bCO3kgNSPamE0PZXULgJ1T9QTOlqA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709160322; c=relaxed/simple; bh=1/CGCY3jhF/evFGu5DL8ruxZKJOzhM2yszIHb1BXMFM=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=QtwVYQmHhxsZjJgbDSRIcFXWnDocKMl8+EchqpU/OvPj4mf3eJfUZNL76IbE3TRS2g8919w/c0e6Czlm34BVH7NrpPuwrk6sELp3Mo9vCOpjDeN0aq5XGA10PWAlY9I/3yUtMmJCCa8Wr3FNCNyasSXx8P8P3MXlIuD42EYkS5o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=YKz4xn2w; arc=none smtp.client-ip=209.85.167.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-lf1-f46.google.com with SMTP id 2adb3069b0e04-513235b5975so235878e87.2 for ; Wed, 28 Feb 2024 14:45:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1709160315; x=1709765115; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=VxABPZ28o1U9eMcO7y1qUMLxndBrASNoz0KbMJJ/fIg=; b=YKz4xn2wjxE5QXqeBGaAqLix3SQvnOOsn5GBSNc5BhlQiopao0kls/SlDlxahbPPdv Y+M/neUquTqYcge+AED5teN5qJduuZgUB3uBYlKk7FToB4U+/XoBwfcmHMEy5+NLSEXy UJ+0KxBb3yTqxMW/aW7FIWHyA3VCaEDjZ0xtg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709160315; x=1709765115; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VxABPZ28o1U9eMcO7y1qUMLxndBrASNoz0KbMJJ/fIg=; b=OEf1Ju0eOR0SyrlwNL8WE+x+o2HpJLlPOYNkpikiu2UN+RsSRxjppUKzqkLvWD3lG3 OaFprouMbnX7aO9Fm+jt06QNQNtiDx7pXcXquETYI8j9WxeqCIHZPPNG63eQumYTTk7Y nQaK2CZRR9fYoHMB1XPRyRzCapEZr4YcwwVPdjY7rZwY9NgGARMaVgd6hOkS7firt4k4 2RGpBH0F5gFEspnwPfD5Pn7RZkuaybPGfu2VSQwL9Vo+N+B+u7WRewyrYq2a5qUuYUGk HRnOD7fnzC8RN15FbIV2b8hCPsEQ1Ytryi07x+GffwMkErctZHsAVAsezrDvAF1/oQUP ae8w== X-Forwarded-Encrypted: i=1; AJvYcCU+QGzwDKyJRNmfPzZnXVTlP+6qKH4DPYfrT0vL7sUBPEUbLFopTlZPOgnEDqirP7fyPR+7tOeSZ1K5arskdAnyLxHq3cVuNN8Am3FP X-Gm-Message-State: AOJu0Yx5cei2h+WhsdAwP9LJiMnF3yzgSeQSD7KnCcpv7/MJa4FuL+Oa 2n0NoyR4IY5SNavl5tfwA1NselbU+320S6v/4Xkozwy4p/eZxJrpratnOWeZLx4qBPOK7JCtbYX WH/hB X-Received: by 2002:ac2:4d10:0:b0:513:2347:4b57 with SMTP id r16-20020ac24d10000000b0051323474b57mr168319lfi.66.1709160315694; Wed, 28 Feb 2024 14:45:15 -0800 (PST) Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com. [209.85.128.41]) by smtp.gmail.com with ESMTPSA id x16-20020a170906b09000b00a3fce8c0f99sm2307333ejy.191.2024.02.28.14.45.14 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 28 Feb 2024 14:45:14 -0800 (PST) Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-412a2c2ce88so9865e9.1 for ; Wed, 28 Feb 2024 14:45:14 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXph1xa+aLqQ356A4enzTzq6OyGLe5jno/uMSPKNlYTM6pTVmsw/DF5KOCASJezFKwaJsWfmuCHynTOOPO0qwPKZLEhI/a789EC6Z2P X-Received: by 2002:a05:600c:538f:b0:412:b689:5d88 with SMTP id hg15-20020a05600c538f00b00412b6895d88mr18372wmb.3.1709160314368; Wed, 28 Feb 2024 14:45:14 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240228072216.95130-1-yaoma@linux.alibaba.com> <20240228072216.95130-5-yaoma@linux.alibaba.com> In-Reply-To: <20240228072216.95130-5-yaoma@linux.alibaba.com> From: Doug Anderson Date: Wed, 28 Feb 2024 14:44:58 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCHv11 4/4] watchdog/softlockup: report the most frequent interrupts To: Bitao Hu Cc: tglx@linutronix.de, liusong@linux.alibaba.com, akpm@linux-foundation.org, pmladek@suse.com, kernelfans@gmail.com, deller@gmx.de, npiggin@gmail.com, tsbogend@alpha.franken.de, James.Bottomley@hansenpartnership.com, jan.kiszka@siemens.com, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, On Tue, Feb 27, 2024 at 11:22=E2=80=AFPM Bitao Hu = wrote: > > When the watchdog determines that the current soft lockup is due > to an interrupt storm based on CPU utilization, reporting the > most frequent interrupts could be good enough for further > troubleshooting. > > Below is an example of interrupt storm. The call tree does not > provide useful information, but we can analyze which interrupt > caused the soft lockup by comparing the counts of interrupts. > > [ 638.870231] watchdog: BUG: soft lockup - CPU#9 stuck for 26s! [swapper= /9:0] > [ 638.870825] CPU#9 Utilization every 4s during lockup: > [ 638.871194] #1: 0% system, 0% softirq, 100% hardirq, = 0% idle > [ 638.871652] #2: 0% system, 0% softirq, 100% hardirq, = 0% idle > [ 638.872107] #3: 0% system, 0% softirq, 100% hardirq, = 0% idle > [ 638.872563] #4: 0% system, 0% softirq, 100% hardirq, = 0% idle > [ 638.873018] #5: 0% system, 0% softirq, 100% hardirq, = 0% idle > [ 638.873494] CPU#9 Detect HardIRQ Time exceeds 50%. Most frequent HardI= RQs: > [ 638.873994] #1: 330945 irq#7 > [ 638.874236] #2: 31 irq#82 > [ 638.874493] #3: 10 irq#10 > [ 638.874744] #4: 2 irq#89 > [ 638.874992] #5: 1 irq#102 > ... > [ 638.875313] Call trace: > [ 638.875315] __do_softirq+0xa8/0x364 > > Signed-off-by: Bitao Hu > Reviewed-by: Liu Song > --- > kernel/watchdog.c | 115 ++++++++++++++++++++++++++++++++++++++++++++-- > 1 file changed, 111 insertions(+), 4 deletions(-) Reviewed-by: Douglas Anderson