Subject: [PATCH net-next v6 0/2] xsk: move cq_cached_prod_lock

From: Jason Xing <[email-masked]>
Date: Sun, 4 Jan 2026 09:21:23 +0800

From: Jason Xing <[email-masked]>

Move cq_cached_prod_lock to avoid touching new cacheline.

---
V6
Link: https://lore.kernel.org/all/[email-masked]/
1. only rebase

RFC V5
Link: https://lore.kernel.org/all/[email-masked]/
1. From what I lately know from the repro at the above link, application
can use the shared umem mode directly but the kernel will eventually
return error that is reflected in the xp_assign_dev_shared(). Advancing
the check can avoid the crash in patch [1/2] and be good to avoid
unnecessary memory allocation.

RFC V4
Link: https://lore.kernel.org/all/[email-masked]/
1. use moving lock method instead (Paolo, Magnus)
2. Add credit to Paolo, thanks!

v3
Link: https://lore.kernel.org/all/[email-masked]/
1. fix one race issue that cannot be resolved by simple seperated atomic
operations. So this revision only updates patch [2/3] and tries to use
try_cmpxchg method to avoid that problem. (paolo)
2. update commit log accordingly.

V2
Link: https://lore.kernel.org/all/[email-masked]/
1. use separate functions rather than branches within shared routines. (Maciej)
2. make each patch as simple as possible for easier review

Jason Xing (2):
  xsk: advance cq/fq check when shared umem is used
  xsk: move cq_cached_prod_lock to avoid touching a cacheline in sending
    path

 include/net/xsk_buff_pool.h |  5 -----
 net/xdp/xsk.c               | 15 +++++++++++----
 net/xdp/xsk_buff_pool.c     |  6 +-----
 net/xdp/xsk_queue.h         |  5 +++++
 4 files changed, 17 insertions(+), 14 deletions(-)

-- 
2.41.3