Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp853434rdb; Mon, 29 Jan 2024 23:48:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IEDM/aErW2w4wrvg33HF+V47Bjo02rEI+LxbalccdquZsv732WVbQwxM4zqkaCEDizSE19R X-Received: by 2002:a05:6214:1c4c:b0:684:d2a1:990f with SMTP id if12-20020a0562141c4c00b00684d2a1990fmr699218qvb.40.1706600882925; Mon, 29 Jan 2024 23:48:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706600882; cv=pass; d=google.com; s=arc-20160816; b=R8ulTByUmpt22S1j3BIEQo0oCyMGhujozOs25H6NpnL3c0zRyyMvuhdQH3aIi2s0yr /wnpIwjUT9OOY+eVQP6iOdtrCa+VGl2kD6MowlXYD4dMXCtxJqQLLwVlKqaahQxE8WKX TKD64J7B4BGeW+4heYoNAPm7YUgGVcdljhS8J/W+ZR4J8eDVKkdV+YMwT0kvTnilcG5p p+cbLjgKZGv9Cq1SVU/cCwrP4iY/1NWIOCkep1zk5sHzb3XB7EAbn8mgtg9hdEAlGzNJ CDzoU9eiGMJSJBHKZKJMP8hf2m+w0djaG2eo+lm5iGk6dPq0ab89h+vhYPIFvfjm68EO R/pQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=sRk2HXZ+P6gMiJU8Q6E3wGvbidxUtQKZLf2zoOIxXPg=; fh=iwSnT5NYnDHQTJ12VpDVBCo/Xa2twiuP43PvK1ma9TE=; b=TyoYIx1V4XfY7fEe+7U8VJ1kBj4eQWa2a5ZydtALjKA9XlXn5vRIH70wxkYmQFC5jE Sy0EU9ghHZyDZqtwgu9JT1hA0dMrFopqL0WbcY5qTDDCCYZtqo1Kd6brfzBSFYTny7Yn f6RIM/LZy4Znyv3HjRmWj9td0j7eYkVSy7UEFp0MXSIbO5WY1a9clSMwaxPOXUgwX8MI KdrSKzkfEQWs2mNp4SrtZtcRc7kU0ssngIXnOTG4+7H1vK4Y/6Gd6CB3IudnJoO776mh I9Bq4gRLDb81yd/T9bswjmILtgVfhU0Y0iuV2Y3kp63TUo72/fnO/8tsJ3plCEjfnfZU Bxgw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b="ViRpY/vh"; 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-44064-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44064-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 10-20020a0562140d4a00b0068c58039ddfsi2455744qvr.199.2024.01.29.23.48.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 23:48:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-44064-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="ViRpY/vh"; 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-44064-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44064-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 AA21D1C23740 for ; Tue, 30 Jan 2024 07:48:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E0A9953E09; Tue, 30 Jan 2024 07:47:56 +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="ViRpY/vh" Received: from out30-131.freemail.mail.aliyun.com (out30-131.freemail.mail.aliyun.com [115.124.30.131]) (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 2CEF54C614 for ; Tue, 30 Jan 2024 07:47:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706600875; cv=none; b=bPlJ9zfAf/BSi18QMwgrtdWJ2m6BYWUi+I8FPpyEpB52h+abyX0knhqZxGvdemdNoigFbAhzrNa6W6Mbeswh1FvwPrftAkYjghb3I1M5VDuHmmQ4YrkKp0ILDDdBtO39/QCVn+1/+J+LGaROd4KdiU+hH9UMOQ/B/K6CQ2h4lu4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706600875; c=relaxed/simple; bh=ZD9FjIFEh9g0f9kLwm6/eKa1ui1iFwhuOPdBntCyj6U=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type; b=WAS+HjfNuD5jsM/DO89etNPldOqvlzp6iw+yTZQAFoQpcwRE3h5s7WdJ4w3Y7tg3Qk0n7U/2tvAfUZpxjzrOVLr6qY4McgZ/vUBzDyNtKflZeENk5aXxUO8RPLZIVi2T6zYZLXSGTRSSMY8vNNFoWcHqHPxQVce9jzq7Nx+l3PI= 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=ViRpY/vh; arc=none smtp.client-ip=115.124.30.131 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=1706600870; h=From:To:Subject:Date:Message-Id:MIME-Version:Content-Type; bh=sRk2HXZ+P6gMiJU8Q6E3wGvbidxUtQKZLf2zoOIxXPg=; b=ViRpY/vhOANXK2gTTrdULYBcmCE4MEa0YDbd8IVUREQe73aRfvB/cwDGpIAwSmvxZt/Cmjs4FdVqD6o6iLsq09YfJ1Ir/PUCIl4t1xel2N9pyJFh3c3CLpycGHrcTXO2feOTQ4IRUlCmwed2T5I//kscGUF0OizsHWy9EDcNopQ= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045168;MF=yaoma@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0W.fTvZz_1706600868; Received: from localhost.localdomain(mailfrom:yaoma@linux.alibaba.com fp:SMTPD_---0W.fTvZz_1706600868) by smtp.aliyun-inc.com; Tue, 30 Jan 2024 15:47:50 +0800 From: Bitao Hu To: dianders@chromium.org, akpm@linux-foundation.org, pmladek@suse.com, lecopzer.chen@mediatek.com, kernelfans@gmail.com, liusong@linux.alibaba.com Cc: linux-kernel@vger.kernel.org, yaoma@linux.alibaba.com Subject: [PATCHv2 0/2] *** Detect interrupt storm in softlockup *** Date: Tue, 30 Jan 2024 15:47:42 +0800 Message-Id: <20240130074744.45759-1-yaoma@linux.alibaba.com> X-Mailer: git-send-email 2.37.1 (Apple Git-137.1) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I have implemented a low-overhead method for detecting interrupt storm in softlockup. Please review it, all comments are welcome. Changes from v1 to v2: - From Douglas, optimize the memory of cpustats. With the maximum number of CPUs, that's now this. 2 * 8192 * 4 + 1 * 8192 * 5 * 4 + 1 * 8192 = 237,568 bytes. - From Liu Song, refactor the code format and add necessary comments. - From Douglas, use interrupt counts instead of interrupt time to determine the cause of softlockup. - Remove the cmdline parameter added in PATCHv1. Bitao Hu (2): watchdog/softlockup: low-overhead detection of interrupt storm watchdog/softlockup: report the most frequent interrupts kernel/watchdog.c | 222 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 222 insertions(+) -- 2.37.1 (Apple Git-137.1)