io_uring: Avoid needless update of completion queue head pointer
authorAnton Blanchard <anton@ozlabs.org>
Mon, 13 Jul 2020 01:34:48 +0000 (11:34 +1000)
committerAnton Blanchard <anton@ozlabs.org>
Mon, 13 Jul 2020 01:34:48 +0000 (11:34 +1000)
commit76ce63dd5eb566a4299e00181dfad9c1d109f515
treecbf212bf4c70bad9ac48204b0f25e35d83eb303a
parent5bd526f2a614e75a929906c91a5fa3bab293d319
io_uring: Avoid needless update of completion queue head pointer

I'm seeing a slowdown in io_uring performance on a POWER9 box when
the userspace and kernel polling threads are on two cores that
share an L2 cache.

fio_ioring_cqring_reap() always stores to the completion queue head
pointer, even if nothing was reaped and the value hasn't changed.

Changing this to only update the head pointer when it changes results
in a 95% improvement in performance on this particular test.

Signed-off-by: Anton Blanchard <anton@ozlabs.org>
engines/io_uring.c