[PATCH 26/44] net: mana: Batch ringing RX queue doorbell on receiving packets
authorLong Li <longli@microsoft.com>
Mon, 17 Jul 2023 19:35:38 +0000 (12:35 -0700)
committerSalvatore Bonaccorso <carnil@debian.org>
Thu, 22 May 2025 18:32:07 +0000 (20:32 +0200)
commit236fc1b39e05d461ed1b5462d362b6bb67b2e2d1
tree4574481527eb01c0f3e59ec03b91aa7f063b7320
parent12faae8208199961e20c6f213ff2f350f657b378
[PATCH 26/44] net: mana: Batch ringing RX queue doorbell on receiving packets

It's inefficient to ring the doorbell page every time a WQE is posted to
the received queue. Excessive MMIO writes result in CPU spending more
time waiting on LOCK instructions (atomic operations), resulting in
poor scaling performance.

Move the code for ringing doorbell page to where after we have posted all
WQEs to the receive queue during a callback from napi_poll().

With this change, tests showed an improvement from 120G/s to 160G/s on a
200G physical link, with 16 or 32 hardware queues.

Tests showed no regression in network latency benchmarks on single
connection.

Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Long Li <longli@microsoft.com>
Link: https://lore.kernel.org/r/1689622539-5334-2-git-send-email-longli@linuxonhyperv.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit da4e8648079eb6f26f3a88d8c34270a057e2bfe6)
Signed-off-by: Bastian Blank <waldi@debian.org>
Gbp-Pq: Topic features/all/ethernet-microsoft
Gbp-Pq: Name 0026-net-mana-Batch-ringing-RX-queue-doorbell-on-receivin.patch
drivers/net/ethernet/microsoft/mana/mana_en.c