<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/io_uring/timeout.c, branch v6.4</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.4</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.4'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2023-04-19T01:38:36Z</updated>
<entry>
<title>io_uring: add support for multishot timeouts</title>
<updated>2023-04-19T01:38:36Z</updated>
<author>
<name>David Wei</name>
<email>davidhwei@meta.com</email>
</author>
<published>2023-04-18T22:58:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ea97f6c8558e83cb457c3b5f53351e4fd8519ab1'/>
<id>urn:sha1:ea97f6c8558e83cb457c3b5f53351e4fd8519ab1</id>
<content type='text'>
A multishot timeout submission will repeatedly generate completions with
the IORING_CQE_F_MORE cflag set. Depending on the value of the `off'
field in the submission, these timeouts can either repeat indefinitely
until cancelled (`off' = 0) or for a fixed number of times (`off' &gt; 0).

Only noseq timeouts (i.e. not dependent on the number of I/O
completions) are supported.

An indefinite timer will be cancelled if the CQ ever overflows.

Signed-off-by: David Wei &lt;davidhwei@meta.com&gt;
Link: https://lore.kernel.org/r/20230418225817.1905027-1-davidhwei@meta.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring: encapsulate task_work state</title>
<updated>2023-04-03T13:16:15Z</updated>
<author>
<name>Pavel Begunkov</name>
<email>asml.silence@gmail.com</email>
</author>
<published>2023-03-27T15:38:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a282967c848fb1d92c28334430c472da9c334e54'/>
<id>urn:sha1:a282967c848fb1d92c28334430c472da9c334e54</id>
<content type='text'>
For task works we're passing around a bool pointer for whether the
current ring is locked or not, let's wrap it in a structure, that
will make it more opaque preventing abuse and will also help us
to pass more info in the future if needed.

Signed-off-by: Pavel Begunkov &lt;asml.silence@gmail.com&gt;
Link: https://lore.kernel.org/r/1ecec9483d58696e248d1bfd52cf62b04442df1d.1679931367.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring: ease timeout flush locking requirements</title>
<updated>2022-12-14T15:53:35Z</updated>
<author>
<name>Pavel Begunkov</name>
<email>asml.silence@gmail.com</email>
</author>
<published>2022-12-02T17:47:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e5f30f6fb29a0b8fa7ca784e44571a610b949b04'/>
<id>urn:sha1:e5f30f6fb29a0b8fa7ca784e44571a610b949b04</id>
<content type='text'>
We don't need completion_lock for timeout flushing, don't take it.

Signed-off-by: Pavel Begunkov &lt;asml.silence@gmail.com&gt;
Link: https://lore.kernel.org/r/1e3dc657975ac445b80e7bdc40050db783a5935a.1670002973.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring: revise completion_lock locking</title>
<updated>2022-12-14T15:53:04Z</updated>
<author>
<name>Pavel Begunkov</name>
<email>asml.silence@gmail.com</email>
</author>
<published>2022-12-02T17:47:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6971253f078766543c716db708ba2c787826690d'/>
<id>urn:sha1:6971253f078766543c716db708ba2c787826690d</id>
<content type='text'>
io_kill_timeouts() doesn't post any events but queues everything to
task_work. Locking there is needed for protecting linked requests
traversing, we should grab completion_lock directly instead of using
io_cq_[un]lock helpers. Same goes for __io_req_find_next_prep().

Signed-off-by: Pavel Begunkov &lt;asml.silence@gmail.com&gt;
Link: https://lore.kernel.org/r/88e75d481a65dc295cb59722bb1cf76402d1c06b.1670002973.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring: protect cq_timeouts with timeout_lock</title>
<updated>2022-12-14T15:51:28Z</updated>
<author>
<name>Pavel Begunkov</name>
<email>asml.silence@gmail.com</email>
</author>
<published>2022-12-02T17:47:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ea011ee10231f5fa6cbb415007048ca0bb948baf'/>
<id>urn:sha1:ea011ee10231f5fa6cbb415007048ca0bb948baf</id>
<content type='text'>
Read cq_timeouts in io_flush_timeouts() only after taking the
timeout_lock, as it's protected by it. There are many places where we
also grab -&gt;completion_lock, but for instance io_timeout_fn() doesn't
and still modifies cq_timeouts.

Cc: stable@vger.kernel.org
Signed-off-by: Pavel Begunkov &lt;asml.silence@gmail.com&gt;
Link: https://lore.kernel.org/r/9c79544dd6cf5c4018cb1bab99cf481a93ea46ef.1670002973.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring: remove io_req_tw_post_queue</title>
<updated>2022-11-23T17:44:00Z</updated>
<author>
<name>Pavel Begunkov</name>
<email>asml.silence@gmail.com</email>
</author>
<published>2022-11-23T11:33:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=833b5dfffc26c81835ce38e2a5df9ac5fa142735'/>
<id>urn:sha1:833b5dfffc26c81835ce38e2a5df9ac5fa142735</id>
<content type='text'>
Remove io_req_tw_post() and io_req_tw_post_queue(), we can use
io_req_task_complete() instead.

Signed-off-by: Pavel Begunkov &lt;asml.silence@gmail.com&gt;
Link: https://lore.kernel.org/r/b9b73c08022c7f1457023ac841f35c0100e70345.1669203009.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring: use io_req_task_complete() in timeout</title>
<updated>2022-11-23T17:44:00Z</updated>
<author>
<name>Pavel Begunkov</name>
<email>asml.silence@gmail.com</email>
</author>
<published>2022-11-23T11:33:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=624fd779fd869bdcb2c0ccca0f09456eed71ed52'/>
<id>urn:sha1:624fd779fd869bdcb2c0ccca0f09456eed71ed52</id>
<content type='text'>
Use a more generic io_req_task_complete() in timeout completion
task_work instead of io_req_complete_post().

Signed-off-by: Pavel Begunkov &lt;asml.silence@gmail.com&gt;
Link: https://lore.kernel.org/r/bda1710b58c07bf06107421c2a65c529ea9cdcac.1669203009.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring: remove unused return from io_disarm_next</title>
<updated>2022-09-21T19:15:01Z</updated>
<author>
<name>Pavel Begunkov</name>
<email>asml.silence@gmail.com</email>
</author>
<published>2022-09-08T15:56:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c0dc995eb2295e1be6b95b60c90c59f87b009bdb'/>
<id>urn:sha1:c0dc995eb2295e1be6b95b60c90c59f87b009bdb</id>
<content type='text'>
We removed conditional io_commit_cqring_flush() guarding against
spurious eventfd and the io_disarm_next()'s return value is not used
anymore, just void it.

Signed-off-by: Pavel Begunkov &lt;asml.silence@gmail.com&gt;
Link: https://lore.kernel.org/r/9a441c9a32a58bcc586076fa9a7d0dc33f1fb3cb.1662652536.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring: make io_kiocb_to_cmd() typesafe</title>
<updated>2022-08-12T23:01:00Z</updated>
<author>
<name>Stefan Metzmacher</name>
<email>metze@samba.org</email>
</author>
<published>2022-08-11T07:11:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f2ccb5aed7bce1d8b3ed5b3385759a5509663028'/>
<id>urn:sha1:f2ccb5aed7bce1d8b3ed5b3385759a5509663028</id>
<content type='text'>
We need to make sure (at build time) that struct io_cmd_data is not
casted to a structure that's larger.

Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Link: https://lore.kernel.org/r/c024cdf25ae19fc0319d4180e2298bade8ed17b8.1660201408.git.metze@samba.org
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring: improve io_fail_links()</title>
<updated>2022-07-25T00:39:16Z</updated>
<author>
<name>Pavel Begunkov</name>
<email>asml.silence@gmail.com</email>
</author>
<published>2022-06-25T10:52:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=37c7bd31b3e9e4b6aee3c5227f789c0b586a33a2'/>
<id>urn:sha1:37c7bd31b3e9e4b6aee3c5227f789c0b586a33a2</id>
<content type='text'>
io_fail_links() is called with -&gt;completion_lock held and for that
reason we'd want to keep it as small as we can. Instead of doing
__io_req_complete_post() for each linked request under the lock, fail
them in a task_work handler under -&gt;uring_lock.

Signed-off-by: Pavel Begunkov &lt;asml.silence@gmail.com&gt;
Link: https://lore.kernel.org/r/a2f68708b970a21f4e84ddfa7b3abd67a8fffb27.1656153285.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
</feed>
