Re: [PATCH io_uring 02/16] io_uring/zcrx: move RQ head/tail to separate cache lines
Pavel Begunkov <[email protected]>
| Newsgroups | org.kernel.vger.io-uring,org.kernel.vger.netdev |
|---|---|
| Message-ID | <[email protected]> |
On 8/10/26 18:35, Mina Almasry wrote: > On Fri, Aug 7, 2026 at 6:25 AM Pavel Begunkov <[email protected]> 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. -- Pavel Begunkov