Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5102059rwd; Tue, 23 May 2023 18:31:10 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7pv2yxdt/La+0TLCIUFQmx17GFMK3Bmqhnz8cNwbuKmopT2hQ4vJPmN+1KO6dfU/SWNeTu X-Received: by 2002:a05:6a20:7295:b0:103:ef39:a832 with SMTP id o21-20020a056a20729500b00103ef39a832mr16275499pzk.23.1684891870308; Tue, 23 May 2023 18:31:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684891870; cv=none; d=google.com; s=arc-20160816; b=y8vVy817WxStLkn42oylJHYNidauanzGb2R2jPTdoAVLaegVORhU2vfTq2oRpS/sTP MStXTqu4KNR8d/qf45AkBqMn/MuhtYSXCy4eTrH94oJKRj8fNsyaEQ8X2M9ZoDQ6TwDY VU0VywKHuRED0MdEsnyzManNZReGq8yhjq58HKtxBwylG4Qz84m+TzR8xff6iv8z+mX5 qSI87GL80CxP8JWD/YYgKN5KkFJ5xvJqRhlYDQau1Yug4je4t3rt0/Ky7Sf+XqrlXj+X LvScnwUUACbI93NV2yb6K/bpBwbZq8hQ2UGqGdwoxTy1O29ONi9kdGnTbk5rD9QVwh9M w5KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:references:subject:cc:to:from :message-id:date:content-transfer-encoding:mime-version :dkim-signature; bh=AVTc4E3Ttt3nT4KFEok8KBW7NMbqTnBLOY9relIrJKo=; b=SIaFjIsKVM+wN0Cw/u99wTY3GkvC/1E8kDv5YUtrSyU3jcKwvFMJjN9Kl1KMKGUwLq KGR7/yE79UGthRdrx+2s1G5v3IJcQGBUKkZk4kX7O7vHpDLOGf+atM81ib0amIRmtLD0 8sXn59W5oX8ZCJmP756++dcX4w39zX4hlzXIU/+WgBGsh0o+ENBS1eHK1/6KtFFSZEgP zqOUUqlQWGMzSjnoiBoOk0UH0EJ/G/4D3amgpSKH9NsZj5wQk1l5HAHB0b0OP+TyI63U a52VVA7JaYU8rx0zy1zV9dWuTC+5IpxLVGg7hg6XYMxQQa+UCWVZYgKfegJD8jMP3wNJ 1I5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=M4i5M1Vw; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bv63-20020a632e42000000b0053059dfafe4si3021725pgb.86.2023.05.23.18.30.54; Tue, 23 May 2023 18:31:10 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=M4i5M1Vw; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238961AbjEXBVT (ORCPT + 99 others); Tue, 23 May 2023 21:21:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238954AbjEXBVS (ORCPT ); Tue, 23 May 2023 21:21:18 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CB84189; Tue, 23 May 2023 18:21:08 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 67A4061B8C; Wed, 24 May 2023 01:21:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 08409C433EF; Wed, 24 May 2023 01:21:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684891266; bh=AVTc4E3Ttt3nT4KFEok8KBW7NMbqTnBLOY9relIrJKo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=M4i5M1VwI4Lgjzwfp5Y1UbSlOb9usXVqUWfMQa651Xa2LhUcbjQiuIlt3ZMGAXLSe qTean5+w4TP/GU9s0zi8FJABCj9Cqn2EC75B3b5kAN5zvTeIM+E0zMijKypSu5r/5y 9pHxXdHrvPuCGStuzpqD8wSkW/Qwf6/lrPasISai/pvKUBIdN7I9B2QkbLqeWaVM2h rONOh6CFR446n3se9ODacUXPV2uwYgWuoobGKYrkMcygpBbBA/DGDjwmgz0PHddpPf fdxVBDJ/AJJ15oH07qbns+o4acujOU9HEZUEEodJg75tOHNfU/p/NhA7PGPrOlh888 PSWUSHl8t9nFw== Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 24 May 2023 04:21:01 +0300 Message-Id: From: "Jarkko Sakkinen" To: "Jerry Snitselaar" Cc: "Lino Sanfilippo" , , , , , , , , , , , , , Subject: Re: [PATCH 1/2] tpm, tpm_tis: Handle interrupt storm X-Mailer: aerc 0.14.0 References: <20230522143105.8617-1-LinoSanfilippo@gmx.de> In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On Wed May 24, 2023 at 1:32 AM EEST, Jerry Snitselaar wrote: > I do worry about how many cases will be reported once 6.4 is released, > and this eventually makes its way into distributions. In either case > the dmi table will need to be maintained. The UPX-11i case is a > different issue, and IIRC the L490 it needed a DMI entry, because > trying to catch the irq storm wasn't solving the issue there. I > imagine other odd cases will be popping up as well. > > So far we have 2 irq storm reports with peterz's P360 Tiny, and I > guess that Inspur system reported by the kernel test robot. Then there > is whatever is going on with Peter Ujfalusi's UPX-11i. Yeah, I agree that we need both in order to reach stability. > > Out of top of my head you could e.g. window average the duration betwee= n > > IRQs. When the average goes beyond threshold, then you shutdown > > interrupts. > > Just to make sure I have it clear in my head, you mean when the > average is shorter than the threshold duration between interrupts, > yes? My brain wants to read 'When the average goes beyond threshold' > as 'threshold < average'. > > Does the check need to be a rolling window like 1/2 currently has? I > expect that if the problem exists it will be noticed in the first > window checked. I think what I originally tried was to check over some > interval from when the handler first ran, disable interrupts if > needed, and then skip the check from then on when the handler ran. How about just: average' =3D (average / (then - now)) /2 And if average' > thershold, disable interrupts. BR, Jarkko