Thread (3 messages) 3 messages, 2 authors, 2026-03-16

Re: [PATCH][net-next] net/mlx5: Expedite notifier unregistration during device teardown

From: Jakub Kicinski <kuba@kernel.org>
Date: 2026-03-14 17:54:28
Also in: linux-rdma, lkml

On Thu, 12 Mar 2026 05:48:04 -0400 lirongqing wrote:
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

This acceleration ensures faster teardown during hot-unplug events.
Some detailed example and how long the whole operation takes would be
great in the commit msg.
 /**
+ *	atomic_notifier_chain_unregister_expedited - Remove notifier from an atomic notifier chain
+ *	@nh: Pointer to head of the atomic notifier chain
+ *	@n: Entry to remove from notifier chain
+ *
+ *	Removes a notifier from an atomic notifier chain and forcefully
+ *	accelerates the RCU grace period.
+ *
+ *	Returns zero on success or %-ENOENT on failure.
Warning: kernel/notifier.c:211 No description found for return value of 'atomic_notifier_chain_unregister_expedited'

kdoc wants you to use Return: or Returns: the colon is how it knows this
is the doc for return value not just a random mention of the word
Returns
-- 
pw-bot: cr
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help