From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
edumazet@google.com, andrew+netdev@lunn.ch,
netdev@vger.kernel.org
Cc: Matt Vollrath <tactii@gmail.com>,
anthony.l.nguyen@intel.com, dima.ruinskiy@intel.com,
Aleksandr Loktionov <aleksandr.loktionov@intel.com>,
Michal Cohen <michalx.cohen@intel.com>
Subject: [PATCH net-next 11/15] e1000e: Use __napi_schedule_irqoff()
Date: Tue, 9 Jun 2026 14:35:52 -0700 [thread overview]
Message-ID: <20260609213559.178657-12-anthony.l.nguyen@intel.com> (raw)
In-Reply-To: <20260609213559.178657-1-anthony.l.nguyen@intel.com>
From: Matt Vollrath <tactii@gmail.com>
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 <tactii@gmail.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Tested-by: Michal Cohen <michalx.cohen@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
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 3bdeb5f0dbea..808e5cddd6a9 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.47.1
next prev parent reply other threads:[~2026-06-09 21:36 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-09 21:35 [PATCH net-next 00/15][pull request] Intel Wired LAN Driver Updates 2026-06-09 (idpf, ice, i40e, iavf, ixgbe, igc, igb, e1000e, e1000) Tony Nguyen
2026-06-09 21:35 ` [PATCH net-next 01/15] idpf: Replace use of system_unbound_wq with system_dfl_wq Tony Nguyen
2026-06-09 21:35 ` [PATCH net-next 02/15] ice: remove redundant checks from PTP init Tony Nguyen
2026-06-09 21:35 ` [PATCH net-next 03/15] iavf: iavf_virtchnl_completion: drop duplicate ether_addr_equal() test Tony Nguyen
2026-06-09 21:35 ` [PATCH net-next 04/15] net/intel: Replace manual array size calculation with ARRAY_SIZE Tony Nguyen
2026-06-09 21:35 ` [PATCH net-next 05/15] ixgbe: e610: remove redundant assignment Tony Nguyen
2026-06-09 21:35 ` [PATCH net-next 06/15] igb: Retrieve Tx timestamp from BH workqueue Tony Nguyen
2026-06-12 9:57 ` Simon Horman
2026-06-09 21:35 ` [PATCH net-next 07/15] igb: use ktime_get_real helpers in igb_ptp_reset() Tony Nguyen
2026-06-09 21:35 ` [PATCH net-next 08/15] e1000e: use ktime_get_real_ns() in e1000e_systim_reset() Tony Nguyen
2026-06-09 21:35 ` [PATCH net-next 09/15] igb: use napi_schedule_irqoff() instead of napi_schedule() Tony Nguyen
2026-06-09 21:35 ` [PATCH net-next 10/15] igc: " Tony Nguyen
2026-06-09 21:35 ` Tony Nguyen [this message]
2026-06-09 21:35 ` [PATCH net-next 12/15] e1000: limit endianness conversion to boundary words Tony Nguyen
2026-06-09 21:35 ` [PATCH net-next 13/15] e1000e: " Tony Nguyen
2026-06-09 21:35 ` [PATCH net-next 14/15] igb: fix typos in comments Tony Nguyen
2026-06-09 21:35 ` [PATCH net-next 15/15] igc: " Tony Nguyen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260609213559.178657-12-anthony.l.nguyen@intel.com \
--to=anthony.l.nguyen@intel.com \
--cc=aleksandr.loktionov@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=dima.ruinskiy@intel.com \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=michalx.cohen@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=tactii@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox