Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1870718lqe; Tue, 9 Apr 2024 02:59:22 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWbyuwrIOKEwP/gTs7qYvnL9068E55KjPepWJtkjJFXrz0iQ7ReuxjnINdjoeQEaXDu1W4US5SaVXYBZacNosO5eHb0Dm19TBTTmnlGvw== X-Google-Smtp-Source: AGHT+IE5mOHpHKe//7mlyfPxZgPpjTuhhzEhA392CHWoDT2/4jR4536ozjwKOWC8uiKAobdO4bHa X-Received: by 2002:a05:6a20:6f91:b0:1a7:a435:1388 with SMTP id gv17-20020a056a206f9100b001a7a4351388mr1759271pzb.49.1712656762489; Tue, 09 Apr 2024 02:59:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712656762; cv=pass; d=google.com; s=arc-20160816; b=CJVcsSasufvoU8AAwN/DZ92Wve0bNAB1KMxLxao9vvtP3NCmoo5dz6pgp9zdeJUigK jCDjP5R1dtHGE+k7qo9xuIEZEtosmcn6Py2Ph26CHW+x52s0O4sqveUk2OPU/4yYD1NM syQ31Fp7IbwIdzeGxgrmAO67zogPdmWpHii+JWfIjFkegCrLQA6eKLMS0oawbVoaGmcO P5c0XfhW52v8shO/21IyzjGtw9fOraOR7c5loqXhjCzpxP5WIONAdsTpLsXdhT0wCh/1 ONod9AXzz1PC28fHNayuD250JmbNzeu88xN0NYYXu/uTrTTJ1mzfTDKY6rIzvthfTHG4 EEiQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=qKspgdo2jemqpn3T00b+Xa65C9dMoGtY4Dq7FXO0Tyg=; fh=pRwuCX5p3t786Iq2avXH0Gp3ImG0DI+yXIJ2GY0U9Bc=; b=qWiVS365zgbSLPt9bLxESGrFi9tNmejNgoTFYhOI79beHS3YgGOtaclZL29OLkfipJ Ht5TQ0+jbjEZLZFBj4Wyv3XK+2gabEjbyAiTMiwAn7Mf6lTk2XiTe8VjAdRgQmh2O0ey L30RYGsp+bTANQI5iJYPfqjqG1pYz8U4sDKoEPyjOJwFwVPbtY2Vwwne2ReQKMIBtZHy cOnwEpxDAwNXkrU1WqgX2bQXVUtKsRf8MbqioAouaeLdrRUMS0bUtyUkwLSeDL1wq+kx 2ohGGJi8ZWdgDitZmNbpez6U7dLCfjnCI80tt5txDibBbYjpDD7vAqcRL7cj4X3ql6Pt He1Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=yUJNjNeK; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-136610-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136610-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id t4-20020a170902e84400b001e40af144f1si4468955plg.50.2024.04.09.02.59.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 02:59:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-136610-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=@linutronix.de header.s=2020 header.b=yUJNjNeK; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-136610-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136610-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de 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 4C67028635D for ; Tue, 9 Apr 2024 09:58:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6DD02811E8; Tue, 9 Apr 2024 09:58:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="yUJNjNeK"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="RudeqC4D" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 240BC8004F; Tue, 9 Apr 2024 09:58:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712656718; cv=none; b=Tj+nnyQVusnGWRNpgmu+U+0WJblWge8sG6wUpzbfX6X6YEiDqLhq+Qnv6lml0lc5iANrf1ILf5VNvIHjMcJzAqz2pekFBqMAkRMoru8QoFkq3h63HJanyFIi/ERp0np9XbWfy6sedXqk9xWD3t0Gie8RIwDJTJEsxn2+sSTI8vw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712656718; c=relaxed/simple; bh=TDWicARIPMuMDq2ra9wZntrVl26yeJtNleDsR89JkN0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=QHrRECpUkFfY7O+Gg+UHd6DzKZJbI698cwnWnzbwz2mO3RgkvjPBKyOSmWreNRna7FRxfgl6FPtgi83g9rH9sbxPzKxfiLvQVlpTDqJDvKyOMePmxiqQBvHVxCXsJ166BqpKHWbHFjD6qRNGKGqPzFr2Krbd0OxwYNIUFVN9hRE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=yUJNjNeK; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=RudeqC4D; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1712656715; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=qKspgdo2jemqpn3T00b+Xa65C9dMoGtY4Dq7FXO0Tyg=; b=yUJNjNeKDiThpVYIfc/hToqHg6dkX3L/HoTYvzbPfhlp1m8uKGs2XlnA7L8y5fI5N4cOFQ dQ32nytZ/3UjhNV3dbTOO3Jfj16arUKQd3ugTeQbmVrxaxteUt94atCZh9WNssL7HPPxr3 pCn1ZaCza7yC716aaOz0E9ElJsPiAsyL6aSGwchk4R4+heV6rolxLRbt3rqpDlNbHV0Zsg LM1od7FRSc1KMmptgN9TzUpAkmHkOtD8w6Z/GiQIOQr0nIuvqpNqMb/4UrsnnroGwkCm8s MZ283Al2wq+ZdOXvpPy3OWQoVsoJT3sajNpnJ3c4lnq/exiGmnSga1uqUzT3tA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1712656715; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=qKspgdo2jemqpn3T00b+Xa65C9dMoGtY4Dq7FXO0Tyg=; b=RudeqC4DlrksEdfkH3Xkz8ONgur7Wdpdnh1N4nAB5MWJHlWx6HGF7wJP3MPuxDdcYmBaf0 oxZPsIOLB3/qZhBw== To: Bitao Hu , dianders@chromium.org, 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 Cc: linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, yaoma@linux.alibaba.com Subject: Re: [PATCHv12 1/4] genirq: Provide a snapshot mechanism for interrupt statistics In-Reply-To: <20240306125208.71803-2-yaoma@linux.alibaba.com> References: <20240306125208.71803-1-yaoma@linux.alibaba.com> <20240306125208.71803-2-yaoma@linux.alibaba.com> Date: Tue, 09 Apr 2024 11:58:34 +0200 Message-ID: <87frvu7t85.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Wed, Mar 06 2024 at 20:52, Bitao Hu wrote: > The soft lockup detector lacks a mechanism to identify interrupt storms > as root cause of a lockup. To enable this the detector needs a > mechanism to snapshot the interrupt count statistics on a CPU when the > detector observes a potential lockup scenario and compare that against > the interrupt count when it warns about the lockup later on. The number > of interrupts in that period give a hint whether the lockup might be > caused by an interrupt storm. > > Instead of having extra storage in the lockup detector and accessing > the internals of the interrupt descriptor directly, convert the per CPU > irq_desc::kstat_irq member to a data structure which contains the > counter plus a snapshot member and provide interfaces to take a > snapshot of all interrupts on the current CPU and to retrieve the delta > of a specific interrupt later on. > > Originally-by: Thomas Gleixner > Signed-off-by: Bitao Hu > Reviewed-by: Liu Song > Reviewed-by: Douglas Anderson This does not apply anymore. Also can you please split this apart to convert kstat_irqs to a struct with just the count in it and then add the snapshot mechanics on top. Thanks, tglx