Re: [PATCH][net-next v2] net/mlx5: Expedite notifier unregistration during device teardown
From: Tariq Toukan
Date: Wed Mar 18 2026 - 02:57:18 EST
On 17/03/2026 2:35, lirongqing wrote:
From: Li RongQing <lirongqing@xxxxxxxxx>
During device hot-unplug, the mlx5 driver expects quickly unregister
notification chains. The standard atomic_notifier_chain_unregister()
calls synchronize_rcu(), which introduces significant latency and
can become a bottleneck during mass resource cleanup.
Introduce atomic_notifier_chain_unregister_expedited() to leverage
synchronize_rcu_expedited(), and use it significantly reducing wait
times in the following paths:
- Event Queue (EQ) notifier chain
- Firmware event notifier chain
- IRQ notifier chain
On x86-64 with HZ=1000, 64 networking channels:
- Average teardown time: 3.59s -> 1.9s (47% reduction)
On x86-64 with HZ=250, 64 networking channels:
- Average teardown time: 5.5s -> 1.9s (65% reduction)
Co-developed-by: liyongkang <liyongkang01@xxxxxxxxx>
Signed-off-by: liyongkang <liyongkang01@xxxxxxxxx>
Signed-off-by: Li RongQing <lirongqing@xxxxxxxxx>
---
Diff with v1: fix doc warning and add detailed example
Hi, thanks for your patch.
Direction looks okay overall, nice improvement.
I'd split into 2 patches in a series, though.
This is the kind of patches that should go through our regression tests. I'm taking it for testing and will update.
Regards,
Tariq