aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.cocciconfig
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2020-03-23 22:57:22 +0300
committerJens Axboe <axboe@kernel.dk>2020-03-23 14:58:07 -0600
commit86f3cd1b589a10dbdca98c52cc0cd0f56523c9b3 (patch)
treec615dbf8ddd14c1770a082be365483be975c0a39 /.cocciconfig
parentio-uring: drop 'free_pfile' in struct io_file_put (diff)
downloadwireguard-linux-86f3cd1b589a10dbdca98c52cc0cd0f56523c9b3.tar.xz
wireguard-linux-86f3cd1b589a10dbdca98c52cc0cd0f56523c9b3.zip
io-wq: handle hashed writes in chains
We always punt async buffered writes to an io-wq helper, as the core kernel does not have IOCB_NOWAIT support for that. Most buffered async writes complete very quickly, as it's just a copy operation. This means that doing multiple locking roundtrips on the shared wqe lock for each buffered write is wasteful. Additionally, buffered writes are hashed work items, which means that any buffered write to a given file is serialized. Keep identicaly hashed work items contiguously in @wqe->work_list, and track a tail for each hash bucket. On dequeue of a hashed item, splice all of the same hash in one go using the tracked tail. Until the batch is done, the caller doesn't have to synchronize with the wqe or worker locks again. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to '.cocciconfig')
0 files changed, 0 insertions, 0 deletions