Skip to content

for-next optimisations

Pavel Begunkov io-uring 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest12 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12io_uring: keep SQ pointers in a single cachelinefs/io_uring.c+1 -20 replies
2/12io_uring: move ctx->flags from SQ cachelinefs/io_uring.c+4 -40 replies
3/12io_uring: shuffle more fields into SQ ctx sectionfs/io_uring.c+17 -180 replies
4/12io_uring: refactor io_get_sqe()fs/io_uring.c+2 -20 replies
5/12io_uring: don't cache number of dropped SQEsfs/io_uring.c+5 -70 replies
6/12io_uring: optimise completion timeout flushingfs/io_uring.c+6 -40 replies
7/12io_uring: small io_submit_sqe() optimisationfs/io_uring.c+1 -10 replies
8/12io_uring: clean up check_overflow flagfs/io_uring.c+9 -110 replies
9/12io_uring: wait heads renamingfs/io_uring.c+15 -150 replies
10/12io_uring: move uring_lock locationfs/io_uring.c+7 -90 replies
11/12io_uring: refactor io_req_defer()fs/io_uring.c+19 -200 replies
12/12io_uring: optimise non-drain pathfs/io_uring.c+30 -270 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 5.14 00/12] for-next optimisations

There are two main lines intervened. The first one is pt.2 of ctx field shuffling for better caching. There is a couple of things left on that front.

The second is optimising (assumably) rarely used offset-based timeouts and draining. There is a downside (see 12/12), which will be fixed later. In plans to queue a task_work clearing drain_used (under uring_lock) from io_queue_deferred() once all drainee are gone.

nops(batch=32):

    15.9 MIOPS vs 17.3 MIOPS
nullblk (irqmode=2 completion_nsec=0 submit_queues=16), no merges, no stat
    1002 KIOPS vs 1050 KIOPS

Though the second test is very slow comparing to what I've seen before, so might be not represantative.

Pavel Begunkov (12):
io_uring: keep SQ pointers in a single cacheline
io_uring: move ctx->flags from SQ cacheline
io_uring: shuffle more fields into SQ ctx section
io_uring: refactor io_get_sqe()
io_uring: don't cache number of dropped SQEs
io_uring: optimise completion timeout flushing
io_uring: small io_submit_sqe() optimisation
io_uring: clean up check_overflow flag
io_uring: wait heads renaming
io_uring: move uring_lock location
io_uring: refactor io_req_defer()
io_uring: optimise non-drain path

 fs/io_uring.c | 226 +++++++++++++++++++++++++-------------------------
 1 file changed, 111 insertions(+), 115 deletions(-)
Signature · 1 line
2.31.1