[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <091d2447-6817-46ed-96f4-360a747bfc90@infradead.org>
Date: Wed, 17 Dec 2025 11:18:04 -0800
From: Randy Dunlap <rdunlap@...radead.org>
To: Luigi Rizzo <lrizzo@...gle.com>, Thomas Gleixner <tglx@...utronix.de>,
Marc Zyngier <maz@...nel.org>, Luigi Rizzo <rizzo.unipi@...il.com>,
Paolo Abeni <pabeni@...hat.com>, Andrew Morton <akpm@...ux-foundation.org>,
Sean Christopherson <seanjc@...gle.com>,
Jacob Pan <jacob.jun.pan@...ux.intel.com>
Cc: linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
Bjorn Helgaas <bhelgaas@...gle.com>, Willem de Bruijn <willemb@...gle.com>
Subject: Re: [PATCH-v3 2/3] genirq: Adaptive Global Software Interrupt
Moderation (GSIM)
Hi--
On 12/17/25 3:21 AM, Luigi Rizzo wrote:
> Make GSIM adaptive by measuring total and per-CPU interrupt rates, as
> well as time spent in hardirq on each CPU. The metrics are compared to
> configurable targets, and each CPU adjusts the moderation delay up
> or down depending on the result, using multiplicative increase/decrease.
>
> Configuration is done at boot time via module parameters
>
> irq_moderation.${NAME}=${VALUE}
>
> or at runtime via /proc/irq/soft_moderation
>
> echo ${NAME}=${VALUE} > /proc/irq/soft_moderation
>
> Parameters are:
>
> delay_us (0 off, range 0-500)
> Maximum moderation delay in microseconds.
>
> target_intr_rate (0 off, range 0-50000000)
> Total rate above which moderation should trigger.
>
> hardirq_percent (0 off,range 0-100)
> Percentage of time spent in hardirq above which moderation should
> trigger.
>
> update_ms (range 1-100)
> How often the metrics should be computed and moderation delay
> updated.
This could use some userspace documentation, e.g., in Documentation/admin-guide/,
or in Documentation/admin-guide/kernel-parameters.txt.
or in Documentation/core-api/irq/...
> When target_intr_rate and hardirq_percent are both 0, GSIM uses a fixed
> moderation delay equal to delay_us. Otherwise, the delay is dynamically
> adjusted up or down, independently on each CPU, based on how the total
> and per-CPU metrics compare with the targets.
>
> Provided that delay_us suffices to bring the metrics within the target,
> the control loop will dynamically converge to the minimum actual
> moderation delay to stay within the target.
>
> Change-Id: I19b15d98e214a90fadee1c6e5bce6c8aac7a709a
checkpatch says that we don't take Change-Id: lines in a patch.
OTOH, the git tree currently has 415 of them.
I wonder if we have given up on that.
> Signed-off-by: Luigi Rizzo <lrizzo@...gle.com>
> ---
> kernel/irq/Makefile | 2 +-
> kernel/irq/irq_moderation.c | 94 ++++++++++++++++--
> kernel/irq/irq_moderation.h | 46 ++++++++-
> kernel/irq/irq_moderation_hook.c | 157 +++++++++++++++++++++++++++++++
> kernel/irq/irq_moderation_hook.h | 12 +--
> 5 files changed, 291 insertions(+), 20 deletions(-)
> create mode 100644 kernel/irq/irq_moderation_hook.c
--
~Randy
Powered by blists - more mailing lists