summaryrefslogtreecommitdiff
path: root/io_uring/io_uring.c
diff options
context:
space:
mode:
authorDylan Yudaken <dylany@fb.com>2022-06-30 12:12:31 +0300
committerJens Axboe <axboe@kernel.dk>2022-07-25 03:39:17 +0300
commite0486f3f7c1b6ab7ba7e912bf48d17f04e71d86d (patch)
tree47d2dc83aedefd068cf0ffe66f766cdb56e84807 /io_uring/io_uring.c
parent9b26e811e934eebda59362c9a03d082852552574 (diff)
downloadlinux-e0486f3f7c1b6ab7ba7e912bf48d17f04e71d86d.tar.xz
io_uring: only trace one of complete or overflow
In overflow we see a duplcate line in the trace, and in some cases 3 lines (if initial io_post_aux_cqe fails). Instead just trace once for each CQE Signed-off-by: Dylan Yudaken <dylany@fb.com> Link: https://lore.kernel.org/r/20220630091231.1456789-13-dylany@fb.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/io_uring.c')
-rw-r--r--io_uring/io_uring.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index 523b6ebad15a..caf979cd4327 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -742,7 +742,6 @@ static bool io_fill_cqe_aux(struct io_ring_ctx *ctx,
struct io_uring_cqe *cqe;
ctx->cq_extra++;
- trace_io_uring_complete(ctx, NULL, user_data, res, cflags, 0, 0);
/*
* If we can't get a cq entry, userspace overflowed the
@@ -751,6 +750,8 @@ static bool io_fill_cqe_aux(struct io_ring_ctx *ctx,
*/
cqe = io_get_cqe(ctx);
if (likely(cqe)) {
+ trace_io_uring_complete(ctx, NULL, user_data, res, cflags, 0, 0);
+
WRITE_ONCE(cqe->user_data, user_data);
WRITE_ONCE(cqe->res, res);
WRITE_ONCE(cqe->flags, cflags);