Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1861815pxu; Sun, 6 Dec 2020 09:45:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJwbpcyoShhLUM12mT+7r5GS77OOolZcZGIew0vuho5jjqnLRIfku2sIDIDT7DwIZoPMwHzt X-Received: by 2002:a17:906:591a:: with SMTP id h26mr15666394ejq.174.1607276728314; Sun, 06 Dec 2020 09:45:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607276728; cv=none; d=google.com; s=arc-20160816; b=JSqC7NEp17sZFkBJBwoiA5RYpLLjaahVJg7etcYjI015Vd4idtz3aqPwAnthDJd+xJ UuYZKtvhp5kPvfn/capKjIpx5WUS1jEREaB21sK3bavbS9rZWLPq2s6AzZMCW47H1fA3 579OLOepRvLEipiede9qRVDJNXvGL4DhFHP+ukkPZDnH0RlLgn0ENkzEzHxaXegESeiy qQWcQ5u6LY8AfFm3d53j3x7JA/Iuoq/ZlRPrLPcgYmZs35gGD4m3q5s3aIMIrSTKtNV9 f7iHUmKdGrlqzaZEuJ71UW0eNpWoPlbaSohMLnq5mSXcvmGZwuMGhBPUIKM7z5CyRZI2 /TjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature:dkim-signature; bh=rrz4SCfV7oa3mZTRtbjcwbzYoJPp0zWaNi4nIfeFdyA=; b=CYFnXf4fwtwirC+JIspWkT5omi5TEzLX4u1Kx1CmlzHOrkjFxFkztUot2E0ZAQkSl1 zaIJqXPDM1UbuD7vbUO5NrEq/8SYj8O2cwHZRKwVRi+d1sMIHyJB802Bi5yyzcNb8eXH Cczz6LDbnSyQSam3i7GC5EqqJFpTAvXjdXMv6aq/3ztyigtpcKhTVOcZWViAgoGLVlYy DYloJ1S2lzRUarIvq+KkL7jupaLxh0MaAPbfcJgI3MpRCMUdjWTBwBd2kxEjKc7cRpm7 bcca0ie0HeU5mJdbZF8P4CxdMQ2HL8xjpR1ryio3D7P9gDmSWUdZVkAYhp7brvLsenmW o2eA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hansenpartnership.com header.s=20151216 header.b=rAHcsq13; dkim=pass header.i=@hansenpartnership.com header.s=20151216 header.b=rAHcsq13; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hansenpartnership.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c12si5585145eja.450.2020.12.06.09.45.04; Sun, 06 Dec 2020 09:45:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@hansenpartnership.com header.s=20151216 header.b=rAHcsq13; dkim=pass header.i=@hansenpartnership.com header.s=20151216 header.b=rAHcsq13; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hansenpartnership.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726641AbgLFRlZ (ORCPT + 99 others); Sun, 6 Dec 2020 12:41:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726043AbgLFRlZ (ORCPT ); Sun, 6 Dec 2020 12:41:25 -0500 Received: from bedivere.hansenpartnership.com (bedivere.hansenpartnership.com [IPv6:2607:fcd0:100:8a00::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A4DAC0613D0; Sun, 6 Dec 2020 09:40:45 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by bedivere.hansenpartnership.com (Postfix) with ESMTP id CC4AF128007B; Sun, 6 Dec 2020 09:40:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=hansenpartnership.com; s=20151216; t=1607276442; bh=8ec02T50RHRQ5Id0GXk/fQcLTcNSvBQgNzgeqC9+Bjw=; h=Message-ID:Subject:From:To:Date:In-Reply-To:References:From; b=rAHcsq13Cn4UZfD5NHBqiEJmFBnNOXkPC5aD87Bus2ENurTDMRYfgDlB1X+xgbCwD 4jXNZtN2+tyFJdQf0jOiqd6uPPQ8tMgqa05uBkXdE6m2u5kMo10VgrX61rQwL5Vf/3 sIr4/D+7gQhe89zB1q9PEMHmYbRrM8L5VtABSbzA= Received: from bedivere.hansenpartnership.com ([127.0.0.1]) by localhost (bedivere.hansenpartnership.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4ygq4P4DqnvF; Sun, 6 Dec 2020 09:40:42 -0800 (PST) Received: from jarvis.int.hansenpartnership.com (unknown [IPv6:2601:600:8280:66d1::527]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bedivere.hansenpartnership.com (Postfix) with ESMTPSA id D3CC3128003D; Sun, 6 Dec 2020 09:40:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=hansenpartnership.com; s=20151216; t=1607276442; bh=8ec02T50RHRQ5Id0GXk/fQcLTcNSvBQgNzgeqC9+Bjw=; h=Message-ID:Subject:From:To:Date:In-Reply-To:References:From; b=rAHcsq13Cn4UZfD5NHBqiEJmFBnNOXkPC5aD87Bus2ENurTDMRYfgDlB1X+xgbCwD 4jXNZtN2+tyFJdQf0jOiqd6uPPQ8tMgqa05uBkXdE6m2u5kMo10VgrX61rQwL5Vf/3 sIr4/D+7gQhe89zB1q9PEMHmYbRrM8L5VtABSbzA= Message-ID: <7fe2d70b5daca57d9cd50d3877376e420658ed71.camel@HansenPartnership.com> Subject: Re: [PATCH v3 1/4] irq: export kstat_irqs From: James Bottomley To: Thomas Gleixner , Jarkko Sakkinen , Jerry Snitselaar Cc: linux-kernel@vger.kernel.org, linux-integrity@vger.kernel.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, kernel test robot , Jason Gunthorpe , Peter Huewe , Matthew Garrett , Hans de Goede , Jiri Kosina , Yunfeng Ye , David Airlie , Daniel Vetter , jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com Date: Sun, 06 Dec 2020 09:40:40 -0800 In-Reply-To: <87360i99ck.fsf@nanos.tec.linutronix.de> References: <20201205014340.148235-1-jsnitsel@redhat.com> <20201205014340.148235-2-jsnitsel@redhat.com> <20201205103954.GA17088@kernel.org> <87360i99ck.fsf@nanos.tec.linutronix.de> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.4 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2020-12-06 at 17:40 +0100, Thomas Gleixner wrote: > On Sat, Dec 05 2020 at 12:39, Jarkko Sakkinen wrote: > > On Fri, Dec 04, 2020 at 06:43:37PM -0700, Jerry Snitselaar wrote: > > > To try and detect potential interrupt storms that > > > have been occurring with tpm_tis devices it was suggested > > > to use kstat_irqs() to get the number of interrupts. > > > Since tpm_tis can be built as a module it needs kstat_irqs > > > exported. > > > > I think you should also have a paragraph explicitly stating that > > i915_pmu.c contains a duplicate of kstat_irqs() because it is not > > exported as of today. It adds a lot more weight to this given that > > there is already existing mainline usage (kind of). > > It's abusage and just the fact that it exists is not an argument by > itself. What we want is a count of the interrupts to see if we're having an interrupt storm from the TPM device (some seem to be wired to fire the interrupt even when there's no event to warrant it). Since kstat_irqs_user() does the correct RCU locking, should we be using that instead? James