]> git.baikalelectronics.ru Git - kernel.git/commit
io_wq: add per-wq work handler instead of per work
authorPavel Begunkov <asml.silence@gmail.com>
Mon, 8 Jun 2020 18:08:20 +0000 (21:08 +0300)
committerJens Axboe <axboe@kernel.dk>
Mon, 8 Jun 2020 19:47:37 +0000 (13:47 -0600)
commit3749a7b087575adfeca862bfa5d82972be0e7e06
treef654e1a37dcf8464493d76236f965aefe45c8a83
parentd608f33d6a8aa64bd1d8129d754d8fc65686c460
io_wq: add per-wq work handler instead of per work

io_uring is the only user of io-wq, and now it uses only io-wq callback
for all its requests, namely io_wq_submit_work(). Instead of storing
work->runner callback in each instance of io_wq_work, keep it in io-wq
itself.

pros:
- reduces io_wq_work size
- more robust -- ->func won't be invalidated with mem{cpy,set}(req)
- helps other work

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io-wq.c
fs/io-wq.h
fs/io_uring.c