# Re: \[PATCH io\_uring 02/16\] io\_uring/zcrx: move RQ head/tail to separate cache lines

- From: Mina Almasry \<hidden\>
- Date: 2026-08-11 16:58:24 
- List: netdev
- Page: https://ratatoskr.run/netdev/2026/08/17397952
- Thread: https://ratatoskr.run/io-uring/2026/08/17381931/t.md

```text
On Tue, Aug 11, 2026 at 6:16 AM Pavel Begunkov [ref] wrote:
>
> On 8/10/26 18:35, Mina Almasry wrote:
> > On Fri, Aug 7, 2026 at 6:25 AM Pavel Begunkov [ref] wrote:
> >>
> >> 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 {
> >> +       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.
>

K, thanks.

Reviewed-by: Mina Almasry <redacted>

-- 
Thanks,
Mina
```
