Re: [RFC PATCH net v3 0/1] af_packet: avoid waiting for TPACKET_V3 copies at retirement
From: Jingxuan Xie
Date: Wed Nov 04 2026 - 07:58:11 EST
The issue was found from a field observation in a PREEMPT_RT
deployment: a receive path blocked for hundreds of milliseconds in
prb_retire_current_block() waiting for blk_fill_in_prog_lock, which was
held for read by a preempted packet copy. Manual code inspection found
the same unconditional write_lock() in both the full-block and timer
retirement paths.
I reproduced the ordering on QEMU ARM64 SMP PREEMPT_RT by delaying a
copier after frame reservation. Without the patch, the second send
blocks until the copier is released; with the patch, only that capture
record is dropped, and the block is published after release.
I will include this in the commit message if a v4 is needed for other
reasons.
Thanks,
Jingxuan