On 09/04/2026 11:43, Loktionov, Aleksandr wrote:
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf
Of Matt Vollrath
Sent: Thursday, April 9, 2026 12:17 AM
To: [email protected]
Cc: Matt Vollrath <[email protected]>
Subject: [Intel-wired-lan] [PATCH iwl-next] e1000e: Use
__napi_schedule_irqoff()
The __napi_schedule_irqoff() macro is intended to bypass saving and
restoring IRQ state when scheduling is requested from an IRQ handler,
where hard interrupts are already disabled. Use this macro in all
three interrupt handlers.
This was tested on a system with an I218-V and MSI interrupts. Because
this is an optimization, I was interested in measuring the impact, so
I added ktime_get() time measurement to e1000_intr_msi and a print of
the last sample in the watchdog task. For each test case I ran a bi-
directional iperf3 to saturate the line. With some help from awk, here
are the statistics.
49 samples each, all units ns
previous: min 678 max 1265 mean 879.429 median 806 stddev 137.188
noirq: min 707 max 1165 mean 811.857 median 790 stddev 89.486
According to this informal comparison, the mean time to handle an
interrupt from start to finish is improved by about 8% under load.
Signed-off-by: Matt Vollrath <[email protected]>
---
drivers/net/ethernet/intel/e1000e/netdev.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c
b/drivers/net/ethernet/intel/e1000e/netdev.c
index 9befdacd6730..3ba108bc3036 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -1803,7 +1803,7 @@ static irqreturn_t e1000_intr_msi(int
__always_unused irq, void *data)
adapter->total_tx_packets = 0;
adapter->total_rx_bytes = 0;
adapter->total_rx_packets = 0;
- __napi_schedule(&adapter->napi);
+ __napi_schedule_irqoff(&adapter->napi);
}
return IRQ_HANDLED;
@@ -1882,7 +1882,7 @@ static irqreturn_t e1000_intr(int
__always_unused irq, void *data)
adapter->total_tx_packets = 0;
adapter->total_rx_bytes = 0;
adapter->total_rx_packets = 0;
- __napi_schedule(&adapter->napi);
+ __napi_schedule_irqoff(&adapter->napi);
}
return IRQ_HANDLED;
@@ -1951,7 +1951,7 @@ static irqreturn_t e1000_intr_msix_rx(int
__always_unused irq, void *data)
if (napi_schedule_prep(&adapter->napi)) {
adapter->total_rx_bytes = 0;
adapter->total_rx_packets = 0;
- __napi_schedule(&adapter->napi);
+ __napi_schedule_irqoff(&adapter->napi);
}
return IRQ_HANDLED;
}
--
2.43.0
Reviewed-by: Aleksandr Loktionov <[email protected]>
Tested-By: Michal Cohen <[email protected]>