Skip to content

xsk: move cq_cached_prod_lock

Jason Xing bpf netdev 2 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest2 patches 5 repliesApplied 2/2
  2. v5 RFC2 patches 0 repliesSuperseded

Patches in v6 All 2 applied

#Subject and filesSizeRepliesApplied
1/2xsk: advance cq/fq check when shared umem is usednet/xdp/xsk.c net/xdp/xsk_buff_pool.c+7 -40 repliesApplied
2/2xsk: move cq_cached_prod_lock to avoid touching a cacheline in sending pathinclude/net/xsk_buff_pool.h net/xdp/xsk.c net/xdp/xsk_buff_pool.c +1 more+10 -104 repliesApplied

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchStanislav Fomichev
SeriesA-b
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v6 thread

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

From: Jason Xing <[email protected]>

Move cq_cached_prod_lock to avoid touching new cacheline.

---
V6

1. only rebase

RFC V5

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

1. use moving lock method instead (Paolo, Magnus)
2. Add credit to Paolo, thanks!

v3

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

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(-)
Signature · 1 line
2.41.3