diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2021-10-04 20:02:50 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-10-19 05:49:54 -0600 |
commit | 765ff496c781a982ed0a882a7784c93ce10d1155 (patch) | |
tree | 45aaee67b14fceecd955f2957252909dcf31dbc0 /fs/io-wq.h | |
parent | a33ae9ce16a8ca62c5dffbe8909d185c6c5b4d77 (diff) | |
download | lwn-765ff496c781a982ed0a882a7784c93ce10d1155.tar.gz lwn-765ff496c781a982ed0a882a7784c93ce10d1155.zip |
io_uring: optimise INIT_WQ_LIST
The invariant of io_wq_work_list is that it's empty IFF ->first is NULL,
so no need to initially set ->last. With now having more users of the
list it may play a role, i.e. used in each tw iteration and on every
completion flushing.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/c464ab5cab6e46a858c6d39c107e92b3b5291f13.1633373302.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io-wq.h')
-rw-r--r-- | fs/io-wq.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/io-wq.h b/fs/io-wq.h index 87ba6a733630..41bf37674a49 100644 --- a/fs/io-wq.h +++ b/fs/io-wq.h @@ -38,7 +38,6 @@ struct io_wq_work_list { #define wq_list_empty(list) (READ_ONCE((list)->first) == NULL) #define INIT_WQ_LIST(list) do { \ (list)->first = NULL; \ - (list)->last = NULL; \ } while (0) static inline void wq_list_add_after(struct io_wq_work_node *node, |