<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/linux/io_uring.h, branch v5.15.72</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.15.72</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.15.72'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2021-08-23T19:10:37+00:00</updated>
<entry>
<title>io_uring: remove files pointer in cancellation functions</title>
<updated>2021-08-23T19:10:37+00:00</updated>
<author>
<name>Hao Xu</name>
<email>haoxu@linux.alibaba.com</email>
</author>
<published>2021-08-12T04:14:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f552a27afe67f05c47bb0c33b92af2a23b684c31'/>
<id>urn:sha1:f552a27afe67f05c47bb0c33b92af2a23b684c31</id>
<content type='text'>
When doing cancellation, we use a parameter to indicate where it's from
do_exit or exec. So a boolean value is good enough for this, remove the
struct files* as it is not necessary.

Signed-off-by: Hao Xu &lt;haoxu@linux.alibaba.com&gt;
[axboe: fixup io_uring_files_cancel for !CONFIG_IO_URING]
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring: extract io_uring_files_cancel() in io_uring_task_cancel()</title>
<updated>2021-08-23T19:10:37+00:00</updated>
<author>
<name>Hao Xu</name>
<email>haoxu@linux.alibaba.com</email>
</author>
<published>2021-08-12T04:14:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a4aadd11ea4932588e6530ecd021ffe39f9d5adf'/>
<id>urn:sha1:a4aadd11ea4932588e6530ecd021ffe39f9d5adf</id>
<content type='text'>
Extract io_uring_files_cancel() call in io_uring_task_cancel() to make
io_uring_files_cancel() and io_uring_task_cancel() coherent and easy to
read.

Signed-off-by: Hao Xu &lt;haoxu@linux.alibaba.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring: unify files and task cancel</title>
<updated>2021-04-12T01:30:41+00:00</updated>
<author>
<name>Pavel Begunkov</name>
<email>asml.silence@gmail.com</email>
</author>
<published>2021-04-11T00:46:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3f48cf18f886c97a7e775af10696bfed9ddcff31'/>
<id>urn:sha1:3f48cf18f886c97a7e775af10696bfed9ddcff31</id>
<content type='text'>
Now __io_uring_cancel() and __io_uring_files_cancel() are very similar
and mostly differ by how we count requests, merge them and allow
tctx_inflight() to handle counting.

Signed-off-by: Pavel Begunkov &lt;asml.silence@gmail.com&gt;
Link: https://lore.kernel.org/r/1a5986a97df4dc1378f3fe0ca1eb483dbcf42112.1618101759.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring: remove structures from include/linux/io_uring.h</title>
<updated>2021-03-18T15:44:35+00:00</updated>
<author>
<name>Stefan Metzmacher</name>
<email>metze@samba.org</email>
</author>
<published>2021-03-15T11:56:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=53e043b2b432ef2294efec04dd8a88d96c024624'/>
<id>urn:sha1:53e043b2b432ef2294efec04dd8a88d96c024624</id>
<content type='text'>
Link: https://lore.kernel.org/r/8c1d14f3748105f4caeda01716d47af2fa41d11c.1615809009.git.metze@samba.org
Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring: index io_uring-&gt;xa by ctx not file</title>
<updated>2021-03-07T21:12:43+00:00</updated>
<author>
<name>Pavel Begunkov</name>
<email>asml.silence@gmail.com</email>
</author>
<published>2021-03-06T11:02:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=baf186c4d345f5a105e63df01100936ad622f369'/>
<id>urn:sha1:baf186c4d345f5a105e63df01100936ad622f369</id>
<content type='text'>
We don't use task file notes anymore, and no need left in indexing
task-&gt;io_uring-&gt;xa by file, and replace it with ctx. It's better
design-wise, especially since we keep a dangling file, and so have to
keep an eye on not dereferencing it.

Signed-off-by: Pavel Begunkov &lt;asml.silence@gmail.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring: destroy io-wq on exec</title>
<updated>2021-03-04T13:36:22+00:00</updated>
<author>
<name>Pavel Begunkov</name>
<email>asml.silence@gmail.com</email>
</author>
<published>2021-02-27T11:16:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8452d4a674b0e59bd53baef0b30b018690dde594'/>
<id>urn:sha1:8452d4a674b0e59bd53baef0b30b018690dde594</id>
<content type='text'>
Destroy current's io-wq backend and tctx on __io_uring_task_cancel(),
aka exec(). Looks it's not strictly necessary, because it will be done
at some point when the task dies and changes of creds/files/etc. are
handled, but better to do that earlier to free io-wq and not potentially
lock previous mm and other resources for the time being.

It's safe to do because we wait for all requests of the current task to
complete, so no request will use tctx afterwards. Note, that
io_uring_files_cancel() may leave some requests for later reaping, so it
leaves tctx intact, that's ok as the task is dying anyway.

Signed-off-by: Pavel Begunkov &lt;asml.silence@gmail.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring: ensure io-wq context is always destroyed for tasks</title>
<updated>2021-02-24T03:33:36+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@kernel.dk</email>
</author>
<published>2021-02-23T19:27:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8a378fb096a7f02943c72a428bbfd0029260efb6'/>
<id>urn:sha1:8a378fb096a7f02943c72a428bbfd0029260efb6</id>
<content type='text'>
If the task ends up doing no IO, the context list is empty and we don't
call into __io_uring_files_cancel() when the task exits. This can cause
a leak of the io-wq structures.

Ensure we always call __io_uring_files_cancel(), even if the task
context list is empty.

Fixes: 5aa75ed5b93f ("io_uring: tie async worker side to the task context")
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring: remove io_identity</title>
<updated>2021-02-22T00:25:22+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@kernel.dk</email>
</author>
<published>2021-02-15T20:40:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4379bf8bd70b5de6bba7d53015b0c36c57a634ee'/>
<id>urn:sha1:4379bf8bd70b5de6bba7d53015b0c36c57a634ee</id>
<content type='text'>
We are no longer grabbing state, so no need to maintain an IO identity
that we COW if there are changes.

Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring: tie async worker side to the task context</title>
<updated>2021-02-22T00:25:22+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@kernel.dk</email>
</author>
<published>2021-02-16T19:56:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5aa75ed5b93f086c455a3c67239b0471ff5a1526'/>
<id>urn:sha1:5aa75ed5b93f086c455a3c67239b0471ff5a1526</id>
<content type='text'>
Move it outside of the io_ring_ctx, and tie it to the io_uring task
context.

Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring: provide FIFO ordering for task_work</title>
<updated>2021-02-10T14:28:43+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@kernel.dk</email>
</author>
<published>2021-02-10T00:03:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7cbf1722d5fc5779946ee8f338e9e38b5de15856'/>
<id>urn:sha1:7cbf1722d5fc5779946ee8f338e9e38b5de15856</id>
<content type='text'>
task_work is a LIFO list, due to how it's implemented as a lockless
list. For long chains of task_work, this can be problematic as the
first entry added is the last one processed. Similarly, we'd waste
a lot of CPU cycles reversing this list.

Wrap the task_work so we have a single task_work entry per task per
ctx, and use that to run it in the right order.

Signed-off-by: Pavel Begunkov &lt;asml.silence@gmail.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
</feed>
