projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aaa4db1
)
io_uring: don't free request to slab
author
Hao Xu
<haoxu@linux.alibaba.com>
Wed, 25 Aug 2021 17:58:56 +0000
(
01:58
+0800)
committer
Jens Axboe
<axboe@kernel.dk>
Wed, 25 Aug 2021 19:04:26 +0000
(13:04 -0600)
It's not necessary to free the request back to slab when we fail to
get sqe, just move it to state->free_list.
Signed-off-by: Hao Xu <haoxu@linux.alibaba.com>
Reviewed-by: Pavel Begunkov <asml.silence@gmail.com>
Link:
https://lore.kernel.org/r/20210825175856.194299-1-haoxu@linux.alibaba.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c
patch
|
blob
|
history
diff --git
a/fs/io_uring.c
b/fs/io_uring.c
index e321cb0d00c415deb785863f53474657d8e9b381..be3c3aea6398ed3b2c3c07fd3e04e01821023ff0 100644
(file)
--- a/
fs/io_uring.c
+++ b/
fs/io_uring.c
@@
-6889,7
+6889,7
@@
static int io_submit_sqes(struct io_ring_ctx *ctx, unsigned int nr)
}
sqe = io_get_sqe(ctx);
if (unlikely(!sqe)) {
-
kmem_cache_free(req_cachep, req
);
+
list_add(&req->inflight_entry, &ctx->submit_state.free_list
);
break;
}
/* will complete beyond this point, count as submitted */