Skip to content

return an error when cqe is dropped

Dylan Yudaken io-uring lkml 1 version Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 3 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/6io_uring: add trace support for CQE overflowinclude/trace/events/io_uring.h+41 -10 replies
2/6io_uring: trace cqe overflowsfs/io_uring.c+1 -00 replies
3/6io_uring: rework io_uring_enter to simplify return valuefs/io_uring.c+21 -140 replies
4/6io_uring: use constants for cq_overflow bitfieldfs/io_uring.c+14 -80 replies
5/6io_uring: return an error when cqe is droppedfs/io_uring.c+28 -40 replies
6/6io_uring: allow NOP opcode in IOPOLL modefs/io_uring.c+0 -52 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/6] return an error when cqe is dropped

This series addresses a rare but real error condition when a CQE is dropped. Many applications rely on 1 SQE resulting in 1 CQE and may even block waiting for the CQE. In overflow conditions if the GFP_ATOMIC allocation fails, the CQE is dropped and a counter is incremented. However the application is not actively signalled that something bad has happened. We would like to indicate this error condition to the application but in a way that does not rely on the application doing invasive changes such as checking a flag before each wait.

This series returns an error code to the application when the error hits, and then resets the error condition. If the application is ok with this error it can continue as is, or more likely it can clean up sanely.

Patches 1&2 add tracing for overflows
Patches 3&4 prep for adding this error
Patch 5 is the main one returning an error
Patch 6 allows liburing to test these conditions more easily with IOPOLL

Dylan Yudaken (6):
io_uring: add trace support for CQE overflow
io_uring: trace cqe overflows
io_uring: rework io_uring_enter to simplify return value
io_uring: use constants for cq_overflow bitfield
io_uring: return an error when cqe is dropped
io_uring: allow NOP opcode in IOPOLL mode

 fs/io_uring.c                   | 89 ++++++++++++++++++++++-----------
 include/trace/events/io_uring.h | 42 +++++++++++++++-
 2 files changed, 102 insertions(+), 29 deletions(-)

base-commit: 7c648b7d6186c59ed3a0e0ae4b774aaf4b415ef2

Signature · 1 line
2.30.2