diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2021-06-26 21:40:49 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-06-30 14:15:40 -0600 |
commit | 99ebe4efbd3882422db1fd6a1b477291ea8bdab7 (patch) | |
tree | aadeb6e8c2b16ed616bc351e24b1a28040221640 /drivers/gpu/drm/drm_fb_cma_helper.c | |
parent | 5182ed2e332e8e11fa3c1649ef6d6546ccca64d0 (diff) |
io_uring: pre-initialise some of req fields
Most of requests are allocated from an internal cache, so it's waste of
time fully initialising them every time. Instead, let's pre-init some of
the fields we can during initial allocation (e.g. kmalloc(), see
io_alloc_req()) and keep them valid on request recycling. There are four
of them in this patch:
->ctx is always stays the same
->link is NULL on free, it's an invariant
->result is not even needed to init, just a precaution
->async_data we now clean in io_dismantle_req() as it's likely to
never be allocated.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/892ba0e71309bba9fe9e0142472330bbf9d8f05d.1624739600.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/gpu/drm/drm_fb_cma_helper.c')
0 files changed, 0 insertions, 0 deletions