From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.ilvokhin.com (mail.ilvokhin.com [178.62.254.231]) (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 CC2063DA7DF for ; Mon, 16 Mar 2026 18:46:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.62.254.231 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773686765; cv=none; b=QK6ZgEb5XR/Rqn7bU38Gc6cLT99GwOJAJdjWgOdX4Hae6u4u9UW9oRHZpeXzT8/5m+xOaW3npC9M+Y6TrLbvXyRQjfZfeor6WdNAZClxHtMSAe8E4+PvwOmwDvka+YJbJNu78sfF8s/xLnej23V5MAB5uD+HvLo3jmOpxatkQzM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773686765; c=relaxed/simple; bh=xvoMVAeo9tpkRvNm3tcZkHkmVqwWPimOQkkUCJfbGt4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fBdy8HVRX8fh8cf0Q2FLHx1Nknx/Rd3mGdPGHvroa1AjiVKmOuAO29FR3PmlrPO3pYNmy1SluzMcoOQfdFHxje+oQH51/7kYRySiShqJ1L2LuxukodPnF2fxRDgGhd4UzHVufqwQqnFKBJ1EhFl8NjLl5Q/fTJsBC+5dI7QU5ac= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=ilvokhin.com; spf=pass smtp.mailfrom=ilvokhin.com; dkim=pass (1024-bit key) header.d=ilvokhin.com header.i=@ilvokhin.com header.b=aT/rIPcv; arc=none smtp.client-ip=178.62.254.231 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=ilvokhin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ilvokhin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ilvokhin.com header.i=@ilvokhin.com header.b="aT/rIPcv" Received: from shell.ilvokhin.com (shell.ilvokhin.com [138.68.190.75]) (Authenticated sender: d@ilvokhin.com) by mail.ilvokhin.com (Postfix) with ESMTPSA id CB55DB3C5E; Mon, 16 Mar 2026 18:46:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ilvokhin.com; s=mail; t=1773686761; bh=OG6YjsV54ZgKywCOj/WA9Mj+5mmPUbWbHeBCBZBtnPM=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=aT/rIPcvWjShVMBg2F6MRDV9AMnX54nxPNcf3LZFCmZmyE6sL/Gr1V4AFK21tjhTn ExRT4FQw89nwwnlI8hW146BicTXhm1fOEQUtzCJAoIzbcNh4VN4jV1eFNdhCdT3Ljb t5rldQYa3CEM5M8MovUc+5AQ8osK490vnsaLjUE0= Date: Mon, 16 Mar 2026 18:46:00 +0000 From: Dmitry Ilvokhin To: Thomas Gleixner Cc: LKML , x86@kernel.org, Neil Horman Subject: Re: [patch 06/14] genirq: Cache the condition for /proc/interrupts exposure Message-ID: References: <20260303150539.513068586@kernel.org> <20260303154548.366781240@kernel.org> 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=us-ascii Content-Disposition: inline In-Reply-To: <20260303154548.366781240@kernel.org> On Wed, Mar 04, 2026 at 07:55:53PM +0100, Thomas Gleixner wrote: > show_interrupts() evaluates a boatload of conditions to establish whether > exposing an interrupt in /proc/interrupts or not. > > That can be simplified by caching the condition in an internal status flag, > which is updated when one of the relevant inputs changes. > > As a result the number of instructions and branches for reading > /proc/interrupts is reduced significantly. > > Signed-off-by: Thomas Gleixner > --- > include/linux/irq.h | 1 + > kernel/irq/chip.c | 2 ++ > kernel/irq/internals.h | 2 ++ > kernel/irq/manage.c | 2 ++ > kernel/irq/proc.c | 16 ++++++++++++---- > kernel/irq/settings.h | 14 ++++++++++++++ > 6 files changed, 33 insertions(+), 4 deletions(-) > > --- a/include/linux/irq.h > +++ b/include/linux/irq.h > @@ -99,6 +99,7 @@ enum { > IRQ_DISABLE_UNLAZY = (1 << 19), > IRQ_HIDDEN = (1 << 20), > IRQ_NO_DEBUG = (1 << 21), > + IRQF_RESERVED = (1 << 22), > }; nit: IRQF_ prefix doesn't match the IRQ_ convention used by the other entries in the enum. [...] > --- a/kernel/irq/settings.h > +++ b/kernel/irq/settings.h > @@ -37,6 +37,9 @@ enum { > #undef IRQF_MODIFY_MASK > #define IRQF_MODIFY_MASK GOT_YOU_MORON > > +#define _IRQ_PROC_VALID IRQF_RESERVED > +#undef IRQF_RESERVED The #undef IRQF_RESERVED is a no-op since IRQF_RESERVED is an enum constant, not a macro. Probably, need to follow the same pattern as values above to shadow with GOT_YOU_MORON. Other than that: Reviewed-by: Dmitry Ilvokhin