Re: [PATCH io_uring 02/16] io_uring/zcrx: move RQ head/tail to separate cache lines

From
Pavel Begunkov <asml.silence@gmail.com>
Date
2026-08-11 13:16:35
Also in
io-uring
Reply to
Mina Almasry, 2026-08-10
On 8/10/26 18:35, Mina Almasry wrote:
On Fri, Aug 7, 2026 at 6:25 AM Pavel Begunkov [off-list ref] wrote:
quoted
RQ head and tail are currently put into the same cache line, which can
cause false sharing problems when refill is run on another CPU. Put them
into separate cache lines.
...>> +struct zcrx_rq_hdr {
quoted
+       u32             head ____cacheline_aligned_in_smp;
+       u32             tail ____cacheline_aligned_in_smp;
+};
+
  struct zcrx_rq {
         spinlock_t                      lock;
-       struct io_uring                 *ring;
+       struct zcrx_rq_hdr              *ring;
Is this not a problem in general for everything/most/a lot of using
struct io_uring? Should you make this change to struct io_uring
itself?
No, io_uring headers are usually accessed by the same task,
that's unlike zcrx where the consumer and the producer are
two distinct entities.

-- 
Pavel Begunkov
Thread (21 messages) 21 messages, 3 authors, last reply 2026-08-16
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help