Skip to content

Commit 7cfc1b1

Browse files
edumazetPaolo Abeni
authored andcommitted
net: netdev_tx_sent_queue() small optimization
Change smp_mb() imediately following a set_bit() with smp_mb__after_atomic(). Signed-off-by: Eric Dumazet <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
1 parent e44ef3f commit 7cfc1b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/netdevice.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3517,7 +3517,7 @@ static inline void netdev_tx_sent_queue(struct netdev_queue *dev_queue,
35173517
* because in netdev_tx_completed_queue we update the dql_completed
35183518
* before checking the XOFF flag.
35193519
*/
3520-
smp_mb();
3520+
smp_mb__after_atomic();
35213521

35223522
/* check again in case another CPU has just made room avail */
35233523
if (unlikely(dql_avail(&dev_queue->dql) >= 0))

0 commit comments

Comments
 (0)